Coverage Report

Created: 2023-02-22 06:14

/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
163k
#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
10.7k
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
10.7k
    (void)module;
53
10.7k
    (void)op;
54
55
10.7k
    if ( result.second != std::nullopt ) {
56
4.54k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
4.54k
    }
58
10.7k
}
59
60
10.7k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
10.7k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
10.7k
    return module->OpDigest(op);
64
10.7k
}
65
66
/* Specialization for operation::HMAC */
67
5.34k
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
5.34k
    (void)module;
69
5.34k
    (void)op;
70
71
5.34k
    if ( result.second != std::nullopt ) {
72
2.32k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
2.32k
    }
74
5.34k
}
75
76
5.34k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
5.34k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
5.34k
    return module->OpHMAC(op);
80
5.34k
}
81
82
/* Specialization for operation::UMAC */
83
6.06k
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
6.06k
    (void)module;
85
6.06k
    (void)op;
86
87
6.06k
    if ( result.second != std::nullopt ) {
88
3.01k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
3.01k
    }
90
6.06k
}
91
92
6.06k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
6.06k
    return module->OpUMAC(op);
94
6.06k
}
95
96
/* Specialization for operation::CMAC */
97
5.95k
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
5.95k
    (void)module;
99
5.95k
    (void)op;
100
101
5.95k
    if ( result.second != std::nullopt ) {
102
2.78k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
2.78k
    }
104
5.95k
}
105
106
5.95k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
5.95k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
5.95k
    return module->OpCMAC(op);
110
5.95k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
27.6k
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
27.6k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
27.6k
    if ( result.second != std::nullopt ) {
119
9.33k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
9.33k
        if ( result.second->tag != std::nullopt ) {
121
3.25k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
3.25k
        }
123
9.33k
    }
124
125
27.6k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
7.86k
        using fuzzing::datasource::ID;
127
128
7.86k
        bool tryDecrypt = true;
129
130
7.86k
        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
7.86k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
7.86k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
7.86k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
7.86k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
7.86k
                    op.cleartext.GetSize() + 32,
171
172
7.86k
                    op.aad,
173
174
                    /* Empty modifier */
175
7.86k
                    {});
176
177
7.86k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
7.86k
            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
7.86k
            } 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
7.86k
        }
208
7.86k
    }
209
27.6k
}
210
211
27.6k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
27.6k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
27.6k
    return module->OpSymmetricEncrypt(op);
215
27.6k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
21.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
21.7k
    (void)module;
220
21.7k
    (void)op;
221
222
21.7k
    if ( result.second != std::nullopt ) {
223
1.67k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
1.67k
    }
225
21.7k
}
226
227
21.7k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
21.7k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
21.7k
    return module->OpSymmetricDecrypt(op);
231
21.7k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
1.56k
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
1.56k
    (void)module;
236
1.56k
    (void)op;
237
238
1.56k
    if ( result.second != std::nullopt ) {
239
429
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
429
    }
241
1.56k
}
242
243
1.56k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
1.56k
    return module->OpKDF_SCRYPT(op);
245
1.56k
}
246
247
/* Specialization for operation::KDF_HKDF */
248
11.0k
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
11.0k
    (void)module;
250
11.0k
    (void)op;
251
252
11.0k
    if ( result.second != std::nullopt ) {
253
4.55k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
4.55k
    }
255
11.0k
}
256
257
11.0k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
11.0k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
11.0k
    return module->OpKDF_HKDF(op);
261
11.0k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
727
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
727
    (void)module;
266
727
    (void)op;
267
268
727
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
727
}
272
273
727
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
727
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
727
    return module->OpKDF_PBKDF(op);
277
727
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
867
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
867
    (void)module;
282
867
    (void)op;
283
284
867
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
867
}
288
289
867
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
867
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
867
    return module->OpKDF_PBKDF1(op);
293
867
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
3.30k
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
3.30k
    (void)module;
298
3.30k
    (void)op;
299
300
3.30k
    if ( result.second != std::nullopt ) {
301
1.57k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
1.57k
    }
303
3.30k
}
304
305
3.30k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
3.30k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
3.30k
    return module->OpKDF_PBKDF2(op);
309
3.30k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
1.21k
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
1.21k
    (void)module;
314
1.21k
    (void)op;
315
316
1.21k
    if ( result.second != std::nullopt ) {
317
576
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
576
    }
319
1.21k
}
320
321
1.21k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
1.21k
    return module->OpKDF_ARGON2(op);
323
1.21k
}
324
325
/* Specialization for operation::KDF_SSH */
326
816
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
816
    (void)module;
328
816
    (void)op;
329
330
816
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
816
}
334
335
816
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
816
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
816
    return module->OpKDF_SSH(op);
339
816
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
1.05k
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
1.05k
    (void)module;
344
1.05k
    (void)op;
345
346
1.05k
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
1.05k
}
350
351
1.05k
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
1.05k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
1.05k
    return module->OpKDF_TLS1_PRF(op);
355
1.05k
}
356
357
/* Specialization for operation::KDF_X963 */
358
763
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
763
    (void)module;
360
763
    (void)op;
361
362
763
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
763
}
366
367
763
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
763
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
763
    return module->OpKDF_X963(op);
371
763
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
299
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
299
    (void)module;
376
299
    (void)op;
377
378
299
    if ( result.second != std::nullopt ) {
379
73
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
73
    }
381
299
}
382
383
299
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
299
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
299
    return module->OpKDF_BCRYPT(op);
387
299
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
2.97k
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
2.97k
    (void)module;
392
2.97k
    (void)op;
393
394
2.97k
    if ( result.second != std::nullopt ) {
395
1.22k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
1.22k
    }
397
2.97k
}
398
399
2.97k
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
2.97k
    if ( op.mech.mode == true ) {
401
2.18k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
2.18k
    }
403
404
2.97k
    return module->OpKDF_SP_800_108(op);
405
2.97k
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
4.08k
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
4.08k
    (void)module;
411
412
4.08k
    if ( result.second != std::nullopt  ) {
413
1.09k
        const auto curveID = op.curveType.Get();
414
1.09k
        const auto privkey = op.priv.ToTrimmedString();
415
1.09k
        const auto pub_x = result.second->first.ToTrimmedString();
416
1.09k
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
1.09k
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
1.09k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
1.09k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
1.09k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
1.09k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
1.09k
    }
425
4.08k
}
426
427
4.08k
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
4.08k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
4.08k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
4.08k
    if ( size == 0 || size > 4096 ) {
433
0
        return std::nullopt;
434
0
    }
435
436
4.08k
    return module->OpECC_PrivateToPublic(op);
437
4.08k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
1.72k
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.72k
    (void)module;
442
1.72k
    (void)op;
443
1.72k
    (void)result;
444
1.72k
}
445
446
1.72k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
1.72k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
1.72k
    return module->OpECC_ValidatePubkey(op);
450
1.72k
}
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
81
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
81
    (void)operations;
458
81
    (void)results;
459
81
    (void)data;
460
81
    (void)size;
461
81
}
462
463
2.92k
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
2.92k
    (void)module;
465
466
2.92k
    if ( result.second != std::nullopt  ) {
467
705
        const auto curveID = op.curveType.Get();
468
705
        const auto privkey = result.second->priv.ToTrimmedString();
469
705
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
705
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
705
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
705
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
705
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
705
    }
476
2.92k
}
477
478
2.92k
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
2.92k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
2.92k
    return module->OpECC_GenerateKeyPair(op);
482
2.92k
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
335
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
335
    (void)module;
487
488
335
    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
335
}
531
532
335
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
335
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
335
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
335
    const size_t size = op.priv.ToTrimmedString().size();
537
538
335
    if ( size == 0 || size > 4096 ) {
539
2
        return std::nullopt;
540
2
    }
541
542
333
    return module->OpECCSI_Sign(op);
543
335
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
3.40k
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
3.40k
    (void)module;
548
549
3.40k
    if ( result.second != std::nullopt  ) {
550
1.58k
        const auto curveID = op.curveType.Get();
551
1.58k
        const auto cleartext = op.cleartext.ToHex();
552
1.58k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
1.58k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
1.58k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
1.58k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
1.58k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
1.58k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
1.58k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
1.58k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
1.58k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
1.58k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
1.58k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
1.58k
        {
567
1.58k
            auto opVerify = operation::ECDSA_Verify(
568
1.58k
                    op,
569
1.58k
                    *(result.second),
570
1.58k
                    op.modifier);
571
572
1.58k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
1.58k
            CF_ASSERT(
574
1.58k
                    verifyResult == std::nullopt ||
575
1.58k
                    *verifyResult == true,
576
1.58k
                    "Cannot verify generated signature");
577
1.58k
        }
578
1.58k
    }
579
3.40k
}
580
581
3.40k
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
3.40k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
3.40k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
3.40k
    const size_t size = op.priv.ToTrimmedString().size();
586
587
3.40k
    if ( size == 0 || size > 4096 ) {
588
2
        return std::nullopt;
589
2
    }
590
591
3.40k
    return module->OpECDSA_Sign(op);
592
3.40k
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
968
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
968
    (void)module;
597
598
968
    if ( result.second != std::nullopt  ) {
599
133
        const auto curveID = op.curveType.Get();
600
133
        const auto cleartext = op.cleartext.ToHex();
601
133
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
133
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
133
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
133
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
133
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
133
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
133
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
133
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
133
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
133
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
133
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
133
    }
615
968
}
616
617
968
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
968
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
968
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
968
    const size_t size = op.priv.ToTrimmedString().size();
622
623
968
    if ( size == 0 || size > 4096 ) {
624
7
        return std::nullopt;
625
7
    }
626
627
961
    return module->OpECGDSA_Sign(op);
628
968
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
307
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
307
    (void)module;
633
634
307
    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
307
}
652
653
307
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
307
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
307
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
307
    const size_t size = op.priv.ToTrimmedString().size();
658
659
307
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
307
    return module->OpECRDSA_Sign(op);
664
307
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
292
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
292
    (void)module;
669
670
292
    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
292
}
688
689
292
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
292
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
292
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
292
    const size_t size = op.priv.ToTrimmedString().size();
694
695
292
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
292
    return module->OpSchnorr_Sign(op);
700
292
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
257
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
257
    (void)module;
705
257
    (void)op;
706
257
    (void)result;
707
257
}
708
709
257
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
257
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
257
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
257
    return module->OpECCSI_Verify(op);
714
257
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
1.64k
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
1.64k
    (void)module;
719
1.64k
    (void)op;
720
1.64k
    (void)result;
721
1.64k
}
722
723
1.64k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
1.64k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
1.64k
    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
1.64k
    return module->OpECDSA_Verify(op);
738
1.64k
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
760
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
760
    (void)module;
743
760
    (void)op;
744
760
    (void)result;
745
760
}
746
747
760
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
760
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
760
    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
760
    return module->OpECGDSA_Verify(op);
762
760
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
220
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
220
    (void)module;
767
220
    (void)op;
768
220
    (void)result;
769
220
}
770
771
220
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
220
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
220
    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
220
    return module->OpECRDSA_Verify(op);
786
220
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
251
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
251
    (void)module;
791
251
    (void)op;
792
251
    (void)result;
793
251
}
794
795
251
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
251
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
251
    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
251
    return module->OpSchnorr_Verify(op);
810
251
}
811
812
2.57k
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
2.57k
    (void)module;
814
2.57k
    (void)op;
815
2.57k
    (void)result;
816
2.57k
}
817
818
2.57k
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
2.57k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
2.57k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
2.57k
    return module->OpECDSA_Recover(op);
823
2.57k
}
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
324
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
324
    (void)module;
835
324
    (void)op;
836
324
    (void)result;
837
324
}
838
839
324
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
324
    const std::vector<size_t> sizes = {
841
324
        op.parameters.p.ToTrimmedString().size(),
842
324
        op.parameters.q.ToTrimmedString().size(),
843
324
        op.parameters.g.ToTrimmedString().size(),
844
324
        op.pub.ToTrimmedString().size(),
845
324
        op.signature.first.ToTrimmedString().size(),
846
324
        op.signature.second.ToTrimmedString().size(),
847
324
    };
848
849
1.91k
    for (const auto& size : sizes) {
850
1.91k
        if ( size == 0 || size > 4096 ) {
851
11
            return std::nullopt;
852
11
        }
853
1.91k
    }
854
855
313
    return module->OpDSA_Verify(op);
856
324
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
103
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
103
    (void)operations;
863
103
    (void)results;
864
103
    (void)data;
865
103
    (void)size;
866
103
}
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
360
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
360
    (void)module;
876
360
    (void)op;
877
360
    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
360
}
900
901
360
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
360
    const std::vector<size_t> sizes = {
903
360
        op.parameters.p.ToTrimmedString().size(),
904
360
        op.parameters.q.ToTrimmedString().size(),
905
360
        op.parameters.g.ToTrimmedString().size(),
906
360
        op.priv.ToTrimmedString().size(),
907
360
    };
908
909
1.41k
    for (const auto& size : sizes) {
910
1.41k
        if ( size == 0 || size > 4096 ) {
911
14
            return std::nullopt;
912
14
        }
913
1.41k
    }
914
915
346
    return module->OpDSA_Sign(op);
916
360
}
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
235
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
235
    (void)result;
929
235
    (void)module;
930
235
    if ( result.second != std::nullopt ) {
931
        //Pool_DSA_PubPriv.Set({pub, priv});
932
0
    }
933
235
}
934
935
235
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
936
235
    return module->OpDSA_PrivateToPublic(op);
937
235
}
938
939
/* Specialization for operation::DSA_GenerateKeyPair */
940
941
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
942
template <>
943
99
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 {
944
99
    (void)operations;
945
99
    (void)results;
946
99
    (void)data;
947
99
    (void)size;
948
99
}
949
950
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
951
0
    (void)moduleID;
952
0
    (void)op;
953
954
    /* TODO */
955
0
}
956
957
322
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 {
958
322
    (void)result;
959
322
    (void)module;
960
322
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
961
0
        const auto priv = result.second->first.ToTrimmedString();
962
0
        const auto pub = result.second->second.ToTrimmedString();
963
964
0
        Pool_DSA_PubPriv.Set({pub, priv});
965
0
    }
966
322
}
967
968
322
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
969
322
    const std::vector<size_t> sizes = {
970
322
        op.p.ToTrimmedString().size(),
971
322
        op.q.ToTrimmedString().size(),
972
322
        op.g.ToTrimmedString().size(),
973
322
    };
974
975
964
    for (const auto& size : sizes) {
976
964
        if ( size == 0 || size > 4096 ) {
977
11
            return std::nullopt;
978
11
        }
979
964
    }
980
981
311
    return module->OpDSA_GenerateKeyPair(op);
982
322
}
983
984
/* Specialization for operation::DSA_GenerateParameters */
985
986
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
987
template <>
988
66
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 {
989
66
    (void)operations;
990
66
    (void)results;
991
66
    (void)data;
992
66
    (void)size;
993
66
}
994
995
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
996
0
    (void)moduleID;
997
0
    (void)op;
998
999
    /* TODO */
1000
0
}
1001
1002
238
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 {
1003
238
    (void)result;
1004
238
    (void)module;
1005
238
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1006
0
        const auto P = result.second->p.ToTrimmedString();
1007
0
        const auto Q = result.second->q.ToTrimmedString();
1008
0
        const auto G = result.second->g.ToTrimmedString();
1009
1010
0
        Pool_DSA_PQG.Set({P, Q, G});
1011
1012
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1013
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1014
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1015
0
    }
1016
238
}
1017
1018
238
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1019
238
    return module->OpDSA_GenerateParameters(op);
1020
238
}
1021
1022
/* Specialization for operation::ECDH_Derive */
1023
266
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 {
1024
266
    (void)module;
1025
266
    (void)op;
1026
266
    (void)result;
1027
266
}
1028
1029
266
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1030
266
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1031
1032
266
    return module->OpECDH_Derive(op);
1033
266
}
1034
1035
/* Specialization for operation::ECIES_Encrypt */
1036
template <>
1037
60
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 {
1038
60
    (void)operations;
1039
60
    (void)results;
1040
60
    (void)data;
1041
60
    (void)size;
1042
60
}
1043
218
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 {
1044
218
    (void)module;
1045
218
    (void)op;
1046
218
    (void)result;
1047
218
}
1048
1049
218
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1050
218
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1051
1052
218
    return module->OpECIES_Encrypt(op);
1053
218
}
1054
1055
/* Specialization for operation::ECIES_Decrypt */
1056
271
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 {
1057
271
    (void)module;
1058
271
    (void)op;
1059
271
    (void)result;
1060
271
}
1061
1062
271
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1063
271
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1064
1065
271
    return module->OpECIES_Decrypt(op);
1066
271
}
1067
1068
/* Specialization for operation::ECC_Point_Add */
1069
504
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 {
1070
504
    (void)module;
1071
1072
504
    if ( result.second != std::nullopt  ) {
1073
81
        const auto curveID = op.curveType.Get();
1074
81
        const auto x = result.second->first.ToTrimmedString();
1075
81
        const auto y = result.second->second.ToTrimmedString();
1076
1077
81
        Pool_CurveECC_Point.Set({ curveID, x, y });
1078
1079
81
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1080
81
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1081
81
    }
1082
504
}
1083
1084
504
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 {
1085
504
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1086
1087
504
    return module->OpECC_Point_Add(op);
1088
504
}
1089
1090
/* Specialization for operation::ECC_Point_Mul */
1091
2.80k
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 {
1092
2.80k
    (void)module;
1093
1094
2.80k
    if ( result.second != std::nullopt  ) {
1095
275
        const auto curveID = op.curveType.Get();
1096
275
        const auto x = result.second->first.ToTrimmedString();
1097
275
        const auto y = result.second->second.ToTrimmedString();
1098
1099
275
        Pool_CurveECC_Point.Set({ curveID, x, y });
1100
1101
275
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1102
275
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1103
275
    }
1104
2.80k
}
1105
1106
2.80k
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 {
1107
2.80k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1108
1109
2.80k
    return module->OpECC_Point_Mul(op);
1110
2.80k
}
1111
1112
/* Specialization for operation::ECC_Point_Neg */
1113
462
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 {
1114
462
    (void)module;
1115
1116
462
    if ( result.second != std::nullopt  ) {
1117
76
        const auto curveID = op.curveType.Get();
1118
76
        const auto x = result.second->first.ToTrimmedString();
1119
76
        const auto y = result.second->second.ToTrimmedString();
1120
1121
76
        Pool_CurveECC_Point.Set({ curveID, x, y });
1122
1123
76
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1124
76
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1125
76
    }
1126
462
}
1127
1128
462
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 {
1129
462
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1130
1131
462
    return module->OpECC_Point_Neg(op);
1132
462
}
1133
1134
/* Specialization for operation::ECC_Point_Dbl */
1135
419
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 {
1136
419
    (void)module;
1137
1138
419
    if ( result.second != std::nullopt  ) {
1139
44
        const auto curveID = op.curveType.Get();
1140
44
        const auto x = result.second->first.ToTrimmedString();
1141
44
        const auto y = result.second->second.ToTrimmedString();
1142
1143
44
        Pool_CurveECC_Point.Set({ curveID, x, y });
1144
1145
44
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1146
44
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1147
44
    }
1148
419
}
1149
1150
419
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 {
1151
419
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1152
1153
419
    return module->OpECC_Point_Dbl(op);
1154
419
}
1155
1156
/* Specialization for operation::ECC_Point_Cmp */
1157
538
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 {
1158
538
    (void)module;
1159
538
    (void)result;
1160
538
}
1161
1162
538
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1163
538
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1164
1165
538
    return module->OpECC_Point_Cmp(op);
1166
538
}
1167
1168
/* Specialization for operation::DH_Derive */
1169
1.20k
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 {
1170
1.20k
    (void)module;
1171
1.20k
    (void)op;
1172
1.20k
    (void)result;
1173
1.20k
}
1174
1175
1.20k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1176
1.20k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1177
1.18k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1178
1.16k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1179
1.14k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1180
1181
1.12k
    return module->OpDH_Derive(op);
1182
1.14k
}
1183
1184
/* Specialization for operation::DH_GenerateKeyPair */
1185
289
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 {
1186
289
    (void)result;
1187
289
    (void)op;
1188
289
    (void)module;
1189
1190
289
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1191
0
        const auto priv = result.second->first.ToTrimmedString();
1192
0
        const auto pub = result.second->second.ToTrimmedString();
1193
1194
0
        Pool_DH_PrivateKey.Set(priv);
1195
0
        Pool_DH_PublicKey.Set(pub);
1196
0
    }
1197
289
}
1198
1199
289
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1200
289
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1201
269
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1202
1203
259
    return module->OpDH_GenerateKeyPair(op);
1204
269
}
1205
1206
/* Specialization for operation::BignumCalc */
1207
29.9k
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 {
1208
29.9k
    (void)module;
1209
29.9k
    (void)op;
1210
1211
29.9k
    if ( result.second != std::nullopt  ) {
1212
7.72k
        const auto bignum = result.second->ToTrimmedString();
1213
1214
7.72k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1215
7.70k
            Pool_Bignum.Set(bignum);
1216
7.70k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1217
1.28k
                Pool_Bignum_Primes.Set(bignum);
1218
1.28k
            }
1219
7.70k
        }
1220
7.72k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1221
373
            if ( bignum == "1" ) {
1222
184
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1223
184
            }
1224
373
        }
1225
7.72k
    }
1226
29.9k
}
1227
1228
29.9k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1229
29.9k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1230
1231
    /* Prevent timeouts */
1232
29.9k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1233
29.9k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1234
29.9k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1235
29.9k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1236
1237
29.9k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1238
2.08k
        return std::nullopt;
1239
2.08k
    }
1240
1241
27.8k
    switch ( op.calcOp.Get() ) {
1242
140
        case    CF_CALCOP("SetBit(A,B)"):
1243
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1244
140
            if ( op.bn1.GetSize() > 4 ) {
1245
20
                return std::nullopt;
1246
20
            }
1247
120
            break;
1248
146
        case    CF_CALCOP("Exp(A,B)"):
1249
146
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1250
37
                return std::nullopt;
1251
37
            }
1252
109
            break;
1253
109
        case    CF_CALCOP("ModLShift(A,B,C)"):
1254
40
            if ( op.bn1.GetSize() > 4 ) {
1255
20
                return std::nullopt;
1256
20
            }
1257
20
            break;
1258
104
        case    CF_CALCOP("Exp2(A)"):
1259
104
            if ( op.bn0.GetSize() > 4 ) {
1260
20
                return std::nullopt;
1261
20
            }
1262
84
            break;
1263
27.8k
    }
1264
1265
27.7k
    return module->OpBignumCalc(op);
1266
27.8k
}
1267
1268
/* Specialization for operation::BignumCalc_Fp2 */
1269
415
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 {
1270
415
    (void)module;
1271
415
    (void)op;
1272
1273
415
    if ( result.second != std::nullopt  ) {
1274
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1275
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1276
1277
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1278
0
            Pool_Bignum.Set(bignum_first);
1279
0
        }
1280
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1281
0
            Pool_Bignum.Set(bignum_second);
1282
0
        }
1283
0
    }
1284
415
}
1285
1286
415
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1287
415
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1288
1289
    /* Prevent timeouts */
1290
415
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1291
401
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1292
383
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
372
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
363
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
349
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
331
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1297
313
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1298
1299
288
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1300
0
        return std::nullopt;
1301
0
    }
1302
1303
288
    return module->OpBignumCalc_Fp2(op);
1304
288
}
1305
1306
/* Specialization for operation::BignumCalc_Fp12 */
1307
1.36k
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 {
1308
1.36k
    (void)module;
1309
1.36k
    (void)op;
1310
1311
1.36k
    if ( result.second != std::nullopt  ) {
1312
0
        Pool_Fp12.Set({
1313
0
                result.second->bn1.ToTrimmedString(),
1314
0
                result.second->bn2.ToTrimmedString(),
1315
0
                result.second->bn3.ToTrimmedString(),
1316
0
                result.second->bn4.ToTrimmedString(),
1317
0
                result.second->bn5.ToTrimmedString(),
1318
0
                result.second->bn6.ToTrimmedString(),
1319
0
                result.second->bn7.ToTrimmedString(),
1320
0
                result.second->bn8.ToTrimmedString(),
1321
0
                result.second->bn9.ToTrimmedString(),
1322
0
                result.second->bn10.ToTrimmedString(),
1323
0
                result.second->bn11.ToTrimmedString(),
1324
0
                result.second->bn12.ToTrimmedString()
1325
0
        });
1326
        /* TODO */
1327
#if 0
1328
        const auto bignum_first = result.second->first.ToTrimmedString();
1329
        const auto bignum_second = result.second->second.ToTrimmedString();
1330
1331
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1332
            Pool_Bignum.Set(bignum_first);
1333
        }
1334
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1335
            Pool_Bignum.Set(bignum_second);
1336
        }
1337
#endif
1338
0
    }
1339
1.36k
}
1340
1341
1.36k
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1342
1.36k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1343
1344
    /* Prevent timeouts */
1345
1.36k
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1346
1.34k
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1347
1.32k
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1348
1.30k
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1349
1.28k
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1350
1.26k
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
1.24k
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
1.22k
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
1.21k
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
1.19k
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
1.17k
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
1.15k
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
1358
1.13k
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1359
1.11k
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1360
1.09k
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1361
1.07k
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1362
1.05k
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1363
1.03k
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1364
1.01k
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1365
997
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1366
977
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1367
959
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1368
939
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1369
919
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1370
1371
899
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
879
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
859
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
841
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
821
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
803
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
783
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
763
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
743
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
723
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
705
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
687
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
669
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
651
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
633
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
613
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
593
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
573
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
555
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
535
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
515
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
495
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
477
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
457
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
439
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1398
0
        return std::nullopt;
1399
0
    }
1400
1401
439
    return module->OpBignumCalc_Fp12(op);
1402
439
}
1403
1404
/* Specialization for operation::BLS_PrivateToPublic */
1405
303
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 {
1406
303
    (void)module;
1407
1408
303
    if ( result.second != std::nullopt  ) {
1409
0
        const auto curveID = op.curveType.Get();
1410
0
        const auto g1_x = result.second->first.ToTrimmedString();
1411
0
        const auto g1_y = result.second->second.ToTrimmedString();
1412
1413
0
        G1AddToPool(curveID, g1_x, g1_y);
1414
1415
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1416
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1417
0
    }
1418
303
}
1419
1420
303
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1421
303
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1422
1423
303
    const size_t size = op.priv.ToTrimmedString().size();
1424
1425
303
    if ( size == 0 || size > 4096 ) {
1426
10
        return std::nullopt;
1427
10
    }
1428
1429
293
    return module->OpBLS_PrivateToPublic(op);
1430
303
}
1431
1432
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1433
275
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 {
1434
275
    (void)module;
1435
275
    if ( result.second != std::nullopt  ) {
1436
0
        const auto curveID = op.curveType.Get();
1437
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1438
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1439
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1440
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1441
1442
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1443
1444
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1445
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1446
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1447
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1448
0
    }
1449
275
}
1450
1451
275
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1452
275
    const size_t size = op.priv.ToTrimmedString().size();
1453
1454
275
    if ( size == 0 || size > 4096 ) {
1455
0
        return std::nullopt;
1456
0
    }
1457
1458
275
    return module->OpBLS_PrivateToPublic_G2(op);
1459
275
}
1460
1461
/* Specialization for operation::BLS_Sign */
1462
253
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 {
1463
253
    (void)module;
1464
1465
253
    if ( result.second != std::nullopt  ) {
1466
0
        const auto curveID = op.curveType.Get();
1467
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1468
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1469
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1470
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1471
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1472
0
        const auto dest = op.dest.ToHex();
1473
0
        const auto aug = op.aug.ToHex();
1474
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1475
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1476
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1477
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1478
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1479
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1480
1481
0
        G1AddToPool(curveID, pub_x, pub_y);
1482
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1483
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});
1484
1485
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1486
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1487
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1488
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1489
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1490
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1491
0
    }
1492
253
}
1493
1494
253
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1495
253
    const size_t size = op.priv.ToTrimmedString().size();
1496
1497
253
    if ( size == 0 || size > 4096 ) {
1498
0
        return std::nullopt;
1499
0
    }
1500
1501
253
    return module->OpBLS_Sign(op);
1502
253
}
1503
1504
/* Specialization for operation::BLS_Verify */
1505
290
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 {
1506
290
    (void)module;
1507
290
    (void)op;
1508
290
    (void)result;
1509
290
}
1510
1511
290
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1512
#if 0
1513
    const std::vector<size_t> sizes = {
1514
        op.pub.first.ToTrimmedString().size(),
1515
        op.pub.second.ToTrimmedString().size(),
1516
        op.signature.first.ToTrimmedString().size(),
1517
        op.signature.second.ToTrimmedString().size(),
1518
    };
1519
1520
    for (const auto& size : sizes) {
1521
        if ( size == 0 || size > 4096 ) {
1522
            return std::nullopt;
1523
        }
1524
    }
1525
#endif
1526
1527
290
    return module->OpBLS_Verify(op);
1528
290
}
1529
1530
/* Specialization for operation::BLS_BatchSign */
1531
302
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 {
1532
302
    (void)module;
1533
302
    (void)op;
1534
1535
302
    if ( result.second != std::nullopt  ) {
1536
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1537
0
        for (const auto& mp : result.second->msgpub) {
1538
0
            msgpub.push_back(
1539
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1540
0
                        {
1541
0
                            mp.first.first.ToTrimmedString(),
1542
0
                            mp.first.second.ToTrimmedString()
1543
0
                        },
1544
0
                        {
1545
0
                            mp.second.first.first.ToTrimmedString(),
1546
0
                            mp.second.first.second.ToTrimmedString(),
1547
0
                            mp.second.second.first.ToTrimmedString(),
1548
0
                            mp.second.second.second.ToTrimmedString()
1549
0
                        }
1550
0
                    }
1551
0
            );
1552
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1553
0
            Pool_CurveBLSG2.Set({
1554
0
                    CF_ECC_CURVE("BLS12_381"),
1555
0
                    mp.second.first.first.ToTrimmedString(),
1556
0
                    mp.second.first.second.ToTrimmedString(),
1557
0
                    mp.second.second.first.ToTrimmedString(),
1558
0
                    mp.second.second.second.ToTrimmedString()
1559
0
            });
1560
0
        }
1561
0
        Pool_BLS_BatchSignature.Set({msgpub});
1562
0
    }
1563
302
}
1564
1565
302
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1566
302
    return module->OpBLS_BatchSign(op);
1567
302
}
1568
1569
/* Specialization for operation::BLS_BatchVerify */
1570
285
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 {
1571
285
    (void)module;
1572
285
    (void)op;
1573
285
    (void)result;
1574
285
}
1575
1576
285
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1577
285
    return module->OpBLS_BatchVerify(op);
1578
285
}
1579
1580
/* Specialization for operation::BLS_Aggregate_G1 */
1581
266
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 {
1582
266
    (void)module;
1583
266
    (void)op;
1584
266
    (void)result;
1585
266
}
1586
1587
266
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1588
266
    return module->OpBLS_Aggregate_G1(op);
1589
266
}
1590
1591
/* Specialization for operation::BLS_Aggregate_G2 */
1592
238
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 {
1593
238
    (void)module;
1594
238
    (void)op;
1595
238
    (void)result;
1596
238
}
1597
1598
238
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1599
238
    return module->OpBLS_Aggregate_G2(op);
1600
238
}
1601
1602
/* Specialization for operation::BLS_Pairing */
1603
209
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 {
1604
209
    (void)module;
1605
209
    (void)op;
1606
1607
209
    if ( result.second != std::nullopt  ) {
1608
0
        Pool_Fp12.Set({
1609
0
                result.second->bn1.ToTrimmedString(),
1610
0
                result.second->bn2.ToTrimmedString(),
1611
0
                result.second->bn3.ToTrimmedString(),
1612
0
                result.second->bn4.ToTrimmedString(),
1613
0
                result.second->bn5.ToTrimmedString(),
1614
0
                result.second->bn6.ToTrimmedString(),
1615
0
                result.second->bn7.ToTrimmedString(),
1616
0
                result.second->bn8.ToTrimmedString(),
1617
0
                result.second->bn9.ToTrimmedString(),
1618
0
                result.second->bn10.ToTrimmedString(),
1619
0
                result.second->bn11.ToTrimmedString(),
1620
0
                result.second->bn12.ToTrimmedString()
1621
0
        });
1622
0
    }
1623
209
}
1624
1625
209
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1626
209
    return module->OpBLS_Pairing(op);
1627
209
}
1628
1629
/* Specialization for operation::BLS_MillerLoop */
1630
224
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 {
1631
224
    (void)module;
1632
224
    (void)op;
1633
1634
224
    if ( result.second != std::nullopt  ) {
1635
0
        Pool_Fp12.Set({
1636
0
                result.second->bn1.ToTrimmedString(),
1637
0
                result.second->bn2.ToTrimmedString(),
1638
0
                result.second->bn3.ToTrimmedString(),
1639
0
                result.second->bn4.ToTrimmedString(),
1640
0
                result.second->bn5.ToTrimmedString(),
1641
0
                result.second->bn6.ToTrimmedString(),
1642
0
                result.second->bn7.ToTrimmedString(),
1643
0
                result.second->bn8.ToTrimmedString(),
1644
0
                result.second->bn9.ToTrimmedString(),
1645
0
                result.second->bn10.ToTrimmedString(),
1646
0
                result.second->bn11.ToTrimmedString(),
1647
0
                result.second->bn12.ToTrimmedString()
1648
0
        });
1649
0
    }
1650
224
}
1651
1652
224
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1653
224
    return module->OpBLS_MillerLoop(op);
1654
224
}
1655
1656
/* Specialization for operation::BLS_FinalExp */
1657
314
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 {
1658
314
    (void)module;
1659
314
    (void)op;
1660
1661
314
    if ( result.second != std::nullopt  ) {
1662
0
        Pool_Fp12.Set({
1663
0
                result.second->bn1.ToTrimmedString(),
1664
0
                result.second->bn2.ToTrimmedString(),
1665
0
                result.second->bn3.ToTrimmedString(),
1666
0
                result.second->bn4.ToTrimmedString(),
1667
0
                result.second->bn5.ToTrimmedString(),
1668
0
                result.second->bn6.ToTrimmedString(),
1669
0
                result.second->bn7.ToTrimmedString(),
1670
0
                result.second->bn8.ToTrimmedString(),
1671
0
                result.second->bn9.ToTrimmedString(),
1672
0
                result.second->bn10.ToTrimmedString(),
1673
0
                result.second->bn11.ToTrimmedString(),
1674
0
                result.second->bn12.ToTrimmedString()
1675
0
        });
1676
0
    }
1677
314
}
1678
1679
314
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1680
314
    return module->OpBLS_FinalExp(op);
1681
314
}
1682
1683
/* Specialization for operation::BLS_HashToG1 */
1684
256
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 {
1685
256
    (void)module;
1686
1687
256
    if ( result.second != std::nullopt  ) {
1688
0
        const auto curveID = op.curveType.Get();
1689
0
        const auto g1_x = result.second->first.ToTrimmedString();
1690
0
        const auto g1_y = result.second->second.ToTrimmedString();
1691
1692
0
        G1AddToPool(curveID, g1_x, g1_y);
1693
1694
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1695
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1696
0
    }
1697
256
}
1698
1699
256
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1700
256
    return module->OpBLS_HashToG1(op);
1701
256
}
1702
1703
/* Specialization for operation::BLS_MapToG1 */
1704
306
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 {
1705
306
    (void)module;
1706
1707
306
    if ( result.second != std::nullopt  ) {
1708
0
        const auto curveID = op.curveType.Get();
1709
0
        const auto g1_x = result.second->first.ToTrimmedString();
1710
0
        const auto g1_y = result.second->second.ToTrimmedString();
1711
1712
0
        G1AddToPool(curveID, g1_x, g1_y);
1713
1714
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1715
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1716
0
    }
1717
306
}
1718
1719
306
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1720
306
    return module->OpBLS_MapToG1(op);
1721
306
}
1722
1723
/* Specialization for operation::BLS_MapToG2 */
1724
248
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 {
1725
248
    (void)module;
1726
1727
248
    if ( result.second != std::nullopt  ) {
1728
0
        const auto curveID = op.curveType.Get();
1729
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1730
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1731
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1732
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1733
1734
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1735
1736
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1737
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1738
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1739
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1740
0
    }
1741
248
}
1742
1743
248
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1744
248
    return module->OpBLS_MapToG2(op);
1745
248
}
1746
1747
/* Specialization for operation::BLS_IsG1OnCurve */
1748
247
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 {
1749
247
    (void)module;
1750
247
    (void)op;
1751
247
    (void)result;
1752
247
}
1753
1754
247
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1755
247
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1756
247
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1757
1758
238
    return module->OpBLS_IsG1OnCurve(op);
1759
247
}
1760
1761
/* Specialization for operation::BLS_IsG2OnCurve */
1762
307
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 {
1763
307
    (void)module;
1764
307
    (void)op;
1765
307
    (void)result;
1766
307
}
1767
1768
307
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1769
307
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1770
298
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1771
289
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1772
278
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1773
1774
269
    return module->OpBLS_IsG2OnCurve(op);
1775
278
}
1776
1777
/* Specialization for operation::BLS_GenerateKeyPair */
1778
284
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 {
1779
284
    (void)module;
1780
1781
284
    if ( result.second != std::nullopt  ) {
1782
0
        const auto curveID = op.curveType.Get();
1783
0
        const auto priv = result.second->priv.ToTrimmedString();
1784
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1785
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1786
1787
0
        G1AddToPool(curveID, g1_x, g1_y);
1788
1789
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1790
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1791
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1792
0
    }
1793
284
}
1794
1795
284
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1796
284
    return module->OpBLS_GenerateKeyPair(op);
1797
284
}
1798
1799
/* Specialization for operation::BLS_Decompress_G1 */
1800
227
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 {
1801
227
    (void)module;
1802
1803
227
    if ( result.second != std::nullopt  ) {
1804
0
        const auto curveID = op.curveType.Get();
1805
0
        const auto g1_x = result.second->first.ToTrimmedString();
1806
0
        const auto g1_y = result.second->second.ToTrimmedString();
1807
1808
0
        G1AddToPool(curveID, g1_x, g1_y);
1809
1810
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1811
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1812
0
    }
1813
227
}
1814
1815
227
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1816
227
    return module->OpBLS_Decompress_G1(op);
1817
227
}
1818
1819
/* Specialization for operation::BLS_Compress_G1 */
1820
240
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 {
1821
240
    (void)module;
1822
1823
240
    if ( result.second != std::nullopt  ) {
1824
0
        const auto compressed = result.second->ToTrimmedString();
1825
1826
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1827
0
    }
1828
240
}
1829
1830
240
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1831
240
    return module->OpBLS_Compress_G1(op);
1832
240
}
1833
1834
/* Specialization for operation::BLS_Decompress_G2 */
1835
225
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 {
1836
225
    (void)module;
1837
1838
225
    if ( result.second != std::nullopt  ) {
1839
0
        const auto curveID = op.curveType.Get();
1840
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1841
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1842
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1843
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1844
1845
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1846
1847
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1848
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1849
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1850
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1851
0
    }
1852
225
}
1853
1854
225
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1855
225
    return module->OpBLS_Decompress_G2(op);
1856
225
}
1857
1858
/* Specialization for operation::BLS_Compress_G2 */
1859
258
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 {
1860
258
    (void)module;
1861
1862
258
    if ( result.second != std::nullopt  ) {
1863
0
        const auto curveID = op.curveType.Get();
1864
0
        const auto g1_x = result.second->first.ToTrimmedString();
1865
0
        const auto g1_y = result.second->second.ToTrimmedString();
1866
1867
0
        G1AddToPool(curveID, g1_x, g1_y);
1868
1869
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1870
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1871
0
    }
1872
258
}
1873
1874
258
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1875
258
    return module->OpBLS_Compress_G2(op);
1876
258
}
1877
1878
/* Specialization for operation::BLS_G1_Add */
1879
328
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 {
1880
328
    (void)module;
1881
1882
328
    if ( result.second != std::nullopt  ) {
1883
0
        const auto curveID = op.curveType.Get();
1884
0
        const auto g1_x = result.second->first.ToTrimmedString();
1885
0
        const auto g1_y = result.second->second.ToTrimmedString();
1886
1887
0
        G1AddToPool(curveID, g1_x, g1_y);
1888
1889
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1890
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1891
0
    }
1892
328
}
1893
1894
328
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1895
328
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1896
328
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1897
317
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1898
299
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1899
281
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1900
1901
263
    return module->OpBLS_G1_Add(op);
1902
281
}
1903
1904
/* Specialization for operation::BLS_G1_Mul */
1905
258
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 {
1906
258
    (void)module;
1907
1908
258
    if ( result.second != std::nullopt  ) {
1909
0
        const auto curveID = op.curveType.Get();
1910
0
        const auto g1_x = result.second->first.ToTrimmedString();
1911
0
        const auto g1_y = result.second->second.ToTrimmedString();
1912
1913
0
        G1AddToPool(curveID, g1_x, g1_y);
1914
1915
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1916
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1917
0
    }
1918
258
}
1919
1920
258
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1921
258
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1922
258
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1923
258
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1924
258
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1925
1926
258
    return module->OpBLS_G1_Mul(op);
1927
258
}
1928
1929
/* Specialization for operation::BLS_G1_IsEq */
1930
322
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 {
1931
322
    (void)module;
1932
322
    (void)op;
1933
322
    (void)result;
1934
322
}
1935
1936
322
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1937
322
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1938
322
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1939
313
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1940
295
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1941
286
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1942
1943
277
    return module->OpBLS_G1_IsEq(op);
1944
286
}
1945
1946
/* Specialization for operation::BLS_G1_Neg */
1947
281
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 {
1948
281
    (void)module;
1949
1950
281
    if ( result.second != std::nullopt  ) {
1951
0
        const auto curveID = op.curveType.Get();
1952
0
        const auto g1_x = result.second->first.ToTrimmedString();
1953
0
        const auto g1_y = result.second->second.ToTrimmedString();
1954
1955
0
        G1AddToPool(curveID, g1_x, g1_y);
1956
1957
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1958
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1959
0
    }
1960
281
}
1961
1962
281
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
1963
281
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1964
281
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1965
279
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1966
1967
272
    return module->OpBLS_G1_Neg(op);
1968
279
}
1969
1970
/* Specialization for operation::BLS_G2_Add */
1971
450
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 {
1972
450
    (void)module;
1973
1974
450
    if ( result.second != std::nullopt  ) {
1975
0
        const auto curveID = op.curveType.Get();
1976
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1977
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1978
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1979
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1980
1981
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1982
1983
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1984
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1985
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1986
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1987
0
    }
1988
450
}
1989
1990
450
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
1991
450
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1992
450
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1993
432
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1994
411
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
393
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
375
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1997
357
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1998
339
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1999
320
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2000
2001
302
    return module->OpBLS_G2_Add(op);
2002
320
}
2003
2004
/* Specialization for operation::BLS_G2_Mul */
2005
362
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 {
2006
362
    (void)module;
2007
2008
362
    if ( result.second != std::nullopt  ) {
2009
0
        const auto curveID = op.curveType.Get();
2010
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2011
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2012
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2013
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2014
2015
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2016
2017
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2018
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2019
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2020
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2021
0
    }
2022
362
}
2023
2024
362
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2025
362
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2026
362
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
360
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
351
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
342
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
331
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2031
2032
322
    return module->OpBLS_G2_Mul(op);
2033
331
}
2034
2035
/* Specialization for operation::BLS_G2_IsEq */
2036
398
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 {
2037
398
    (void)module;
2038
398
    (void)op;
2039
398
    (void)result;
2040
398
}
2041
2042
398
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2043
398
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2044
398
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2045
380
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2046
369
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2047
351
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2048
342
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2049
323
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2050
302
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2051
282
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2052
2053
263
    return module->OpBLS_G2_IsEq(op);
2054
282
}
2055
2056
/* Specialization for operation::BLS_G2_Neg */
2057
357
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 {
2058
357
    (void)module;
2059
2060
357
    if ( result.second != std::nullopt  ) {
2061
0
        const auto curveID = op.curveType.Get();
2062
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2063
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2064
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2065
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2066
2067
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2068
2069
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2070
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2071
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2072
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2073
0
    }
2074
357
}
2075
2076
357
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2077
357
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2078
357
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
346
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
332
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
312
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
292
    return module->OpBLS_G2_Neg(op);
2084
312
}
2085
2086
/* Specialization for operation::Misc */
2087
222
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2088
222
    (void)module;
2089
222
    (void)op;
2090
222
    (void)result;
2091
222
}
2092
2093
222
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2094
222
    return module->OpMisc(op);
2095
222
}
2096
2097
/* Specialization for operation::BLS_HashToG2 */
2098
247
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 {
2099
247
    (void)module;
2100
2101
247
    if ( result.second != std::nullopt  ) {
2102
0
        const auto curveID = op.curveType.Get();
2103
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2104
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2105
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2106
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2107
2108
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2109
2110
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2111
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2112
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2113
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2114
0
    }
2115
247
}
2116
2117
247
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2118
247
    return module->OpBLS_HashToG2(op);
2119
247
}
2120
2121
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2122
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2123
40
{ }
2124
38
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2125
38
    this->modulo = component::Bignum(modulo);
2126
38
}
2127
2128
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) :
2129
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2130
2
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2131
2
}
2132
2133
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) :
2134
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2135
2
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2136
2
}
2137
2138
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) :
2139
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2140
2
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2141
2
}
2142
2143
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) :
2144
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2145
2
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2146
2
}
2147
2148
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) :
2149
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2150
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2151
2
}
2152
2153
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) :
2154
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2155
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2156
2
}
2157
2158
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2159
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2160
2
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2161
2
}
2162
2163
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) :
2164
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2165
2
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2166
2
}
2167
2168
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) :
2169
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2170
2
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2171
2
}
2172
2173
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) :
2174
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2175
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2176
2
}
2177
2178
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) :
2179
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2180
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2181
2
}
2182
2183
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) :
2184
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2185
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2186
2
}
2187
2188
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) :
2189
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2190
2
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2191
2
}
2192
2193
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2194
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2195
2
    CF_NORET(SetModulo("18446744073709551616"));
2196
2
}
2197
2198
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2199
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2200
2
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2201
2
}
2202
2203
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2204
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2205
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2206
2
}
2207
2208
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2209
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2210
2
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2211
2
}
2212
2213
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2214
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2215
2
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2216
2
}
2217
2218
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) :
2219
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2220
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2221
2
}
2222
2223
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2224
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2225
2
{ }
2226
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2227
0
    this->modulo = component::Bignum(modulo);
2228
0
}
2229
2230
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2231
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2232
2
{ }
2233
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2234
0
    this->modulo = component::Bignum(modulo);
2235
0
}
2236
2237
template <class ResultType, class OperationType>
2238
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2239
    operationID(operationID),
2240
    modules(modules),
2241
    options(options)
2242
200
{
2243
200
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
40
{
2243
40
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
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
2242
2
{
2243
2
}
2244
2245
/* Specialization for operation::SR25519_Verify */
2246
239
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 {
2247
239
    (void)module;
2248
239
    (void)op;
2249
239
    (void)result;
2250
239
}
2251
2252
239
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2253
239
    return module->OpSR25519_Verify(op);
2254
239
}
2255
2256
template <class ResultType, class OperationType>
2257
200
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
200
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2257
40
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2257
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2258
2
}
2259
2260
/* Filter away the values in the set that are std::nullopt */
2261
template <class ResultType, class OperationType>
2262
49.9k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
49.9k
    ResultSet ret;
2264
2265
166k
    for (const auto& result : results) {
2266
166k
        if ( result.second == std::nullopt ) {
2267
120k
            continue;
2268
120k
        }
2269
2270
46.6k
        ret.push_back(result);
2271
46.6k
    }
2272
2273
49.9k
    return ret;
2274
49.9k
}
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
2262
3.83k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
3.83k
    ResultSet ret;
2264
2265
10.7k
    for (const auto& result : results) {
2266
10.7k
        if ( result.second == std::nullopt ) {
2267
6.20k
            continue;
2268
6.20k
        }
2269
2270
4.54k
        ret.push_back(result);
2271
4.54k
    }
2272
2273
3.83k
    return ret;
2274
3.83k
}
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
2262
1.52k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.52k
    ResultSet ret;
2264
2265
5.34k
    for (const auto& result : results) {
2266
5.34k
        if ( result.second == std::nullopt ) {
2267
3.01k
            continue;
2268
3.01k
        }
2269
2270
2.32k
        ret.push_back(result);
2271
2.32k
    }
2272
2273
1.52k
    return ret;
2274
1.52k
}
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
2262
1.02k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.02k
    ResultSet ret;
2264
2265
6.06k
    for (const auto& result : results) {
2266
6.06k
        if ( result.second == std::nullopt ) {
2267
3.04k
            continue;
2268
3.04k
        }
2269
2270
3.01k
        ret.push_back(result);
2271
3.01k
    }
2272
2273
1.02k
    return ret;
2274
1.02k
}
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
2262
1.43k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.43k
    ResultSet ret;
2264
2265
5.95k
    for (const auto& result : results) {
2266
5.95k
        if ( result.second == std::nullopt ) {
2267
3.17k
            continue;
2268
3.17k
        }
2269
2270
2.78k
        ret.push_back(result);
2271
2.78k
    }
2272
2273
1.43k
    return ret;
2274
1.43k
}
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
2262
5.99k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
5.99k
    ResultSet ret;
2264
2265
27.6k
    for (const auto& result : results) {
2266
27.6k
        if ( result.second == std::nullopt ) {
2267
18.2k
            continue;
2268
18.2k
        }
2269
2270
9.33k
        ret.push_back(result);
2271
9.33k
    }
2272
2273
5.99k
    return ret;
2274
5.99k
}
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
2262
5.77k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
5.77k
    ResultSet ret;
2264
2265
21.7k
    for (const auto& result : results) {
2266
21.7k
        if ( result.second == std::nullopt ) {
2267
20.0k
            continue;
2268
20.0k
        }
2269
2270
1.67k
        ret.push_back(result);
2271
1.67k
    }
2272
2273
5.77k
    return ret;
2274
5.77k
}
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
2262
240
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
240
    ResultSet ret;
2264
2265
1.56k
    for (const auto& result : results) {
2266
1.56k
        if ( result.second == std::nullopt ) {
2267
1.13k
            continue;
2268
1.13k
        }
2269
2270
429
        ret.push_back(result);
2271
429
    }
2272
2273
240
    return ret;
2274
240
}
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
2262
3.51k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
3.51k
    ResultSet ret;
2264
2265
11.0k
    for (const auto& result : results) {
2266
11.0k
        if ( result.second == std::nullopt ) {
2267
6.49k
            continue;
2268
6.49k
        }
2269
2270
4.55k
        ret.push_back(result);
2271
4.55k
    }
2272
2273
3.51k
    return ret;
2274
3.51k
}
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
2262
198
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
198
    ResultSet ret;
2264
2265
1.05k
    for (const auto& result : results) {
2266
1.05k
        if ( result.second == std::nullopt ) {
2267
1.05k
            continue;
2268
1.05k
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
198
    return ret;
2274
198
}
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
2262
99
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
99
    ResultSet ret;
2264
2265
727
    for (const auto& result : results) {
2266
727
        if ( result.second == std::nullopt ) {
2267
727
            continue;
2268
727
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
99
    return ret;
2274
99
}
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
2262
124
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
124
    ResultSet ret;
2264
2265
867
    for (const auto& result : results) {
2266
867
        if ( result.second == std::nullopt ) {
2267
867
            continue;
2268
867
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
124
    return ret;
2274
124
}
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
2262
804
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
804
    ResultSet ret;
2264
2265
3.30k
    for (const auto& result : results) {
2266
3.30k
        if ( result.second == std::nullopt ) {
2267
1.72k
            continue;
2268
1.72k
        }
2269
2270
1.57k
        ret.push_back(result);
2271
1.57k
    }
2272
2273
804
    return ret;
2274
804
}
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
2262
497
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
497
    ResultSet ret;
2264
2265
1.21k
    for (const auto& result : results) {
2266
1.21k
        if ( result.second == std::nullopt ) {
2267
636
            continue;
2268
636
        }
2269
2270
576
        ret.push_back(result);
2271
576
    }
2272
2273
497
    return ret;
2274
497
}
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
2262
118
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
118
    ResultSet ret;
2264
2265
816
    for (const auto& result : results) {
2266
816
        if ( result.second == std::nullopt ) {
2267
816
            continue;
2268
816
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
118
    return ret;
2274
118
}
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
2262
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
97
    ResultSet ret;
2264
2265
763
    for (const auto& result : results) {
2266
763
        if ( result.second == std::nullopt ) {
2267
763
            continue;
2268
763
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
97
    return ret;
2274
97
}
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
2262
132
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
132
    ResultSet ret;
2264
2265
299
    for (const auto& result : results) {
2266
299
        if ( result.second == std::nullopt ) {
2267
226
            continue;
2268
226
        }
2269
2270
73
        ret.push_back(result);
2271
73
    }
2272
2273
132
    return ret;
2274
132
}
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
2262
615
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
615
    ResultSet ret;
2264
2265
2.97k
    for (const auto& result : results) {
2266
2.97k
        if ( result.second == std::nullopt ) {
2267
1.75k
            continue;
2268
1.75k
        }
2269
2270
1.22k
        ret.push_back(result);
2271
1.22k
    }
2272
2273
615
    return ret;
2274
615
}
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
2262
1.62k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.62k
    ResultSet ret;
2264
2265
4.08k
    for (const auto& result : results) {
2266
4.08k
        if ( result.second == std::nullopt ) {
2267
2.99k
            continue;
2268
2.99k
        }
2269
2270
1.09k
        ret.push_back(result);
2271
1.09k
    }
2272
2273
1.62k
    return ret;
2274
1.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2262
720
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
720
    ResultSet ret;
2264
2265
1.72k
    for (const auto& result : results) {
2266
1.72k
        if ( result.second == std::nullopt ) {
2267
484
            continue;
2268
484
        }
2269
2270
1.24k
        ret.push_back(result);
2271
1.24k
    }
2272
2273
720
    return ret;
2274
720
}
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
2262
93
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
93
    ResultSet ret;
2264
2265
335
    for (const auto& result : results) {
2266
335
        if ( result.second == std::nullopt ) {
2267
335
            continue;
2268
335
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
93
    return ret;
2274
93
}
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
2262
1.19k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.19k
    ResultSet ret;
2264
2265
3.40k
    for (const auto& result : results) {
2266
3.40k
        if ( result.second == std::nullopt ) {
2267
1.81k
            continue;
2268
1.81k
        }
2269
2270
1.58k
        ret.push_back(result);
2271
1.58k
    }
2272
2273
1.19k
    return ret;
2274
1.19k
}
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
2262
299
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
299
    ResultSet ret;
2264
2265
968
    for (const auto& result : results) {
2266
968
        if ( result.second == std::nullopt ) {
2267
835
            continue;
2268
835
        }
2269
2270
133
        ret.push_back(result);
2271
133
    }
2272
2273
299
    return ret;
2274
299
}
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
2262
87
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
87
    ResultSet ret;
2264
2265
307
    for (const auto& result : results) {
2266
307
        if ( result.second == std::nullopt ) {
2267
307
            continue;
2268
307
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
87
    return ret;
2274
87
}
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
2262
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
79
    ResultSet ret;
2264
2265
292
    for (const auto& result : results) {
2266
292
        if ( result.second == std::nullopt ) {
2267
292
            continue;
2268
292
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
79
    return ret;
2274
79
}
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
2262
68
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
68
    ResultSet ret;
2264
2265
257
    for (const auto& result : results) {
2266
257
        if ( result.second == std::nullopt ) {
2267
257
            continue;
2268
257
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
68
    return ret;
2274
68
}
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
2262
549
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
549
    ResultSet ret;
2264
2265
1.64k
    for (const auto& result : results) {
2266
1.64k
        if ( result.second == std::nullopt ) {
2267
754
            continue;
2268
754
        }
2269
2270
888
        ret.push_back(result);
2271
888
    }
2272
2273
549
    return ret;
2274
549
}
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
2262
235
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
235
    ResultSet ret;
2264
2265
760
    for (const auto& result : results) {
2266
760
        if ( result.second == std::nullopt ) {
2267
487
            continue;
2268
487
        }
2269
2270
273
        ret.push_back(result);
2271
273
    }
2272
2273
235
    return ret;
2274
235
}
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
2262
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
59
    ResultSet ret;
2264
2265
220
    for (const auto& result : results) {
2266
220
        if ( result.second == std::nullopt ) {
2267
220
            continue;
2268
220
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
59
    return ret;
2274
59
}
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
2262
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
66
    ResultSet ret;
2264
2265
251
    for (const auto& result : results) {
2266
251
        if ( result.second == std::nullopt ) {
2267
251
            continue;
2268
251
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
66
    return ret;
2274
66
}
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
2262
1.00k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.00k
    ResultSet ret;
2264
2265
2.57k
    for (const auto& result : results) {
2266
2.57k
        if ( result.second == std::nullopt ) {
2267
1.56k
            continue;
2268
1.56k
        }
2269
2270
1.00k
        ret.push_back(result);
2271
1.00k
    }
2272
2273
1.00k
    return ret;
2274
1.00k
}
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
2262
94
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
94
    ResultSet ret;
2264
2265
324
    for (const auto& result : results) {
2266
324
        if ( result.second == std::nullopt ) {
2267
324
            continue;
2268
324
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
94
    return ret;
2274
94
}
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
2262
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
63
    ResultSet ret;
2264
2265
235
    for (const auto& result : results) {
2266
235
        if ( result.second == std::nullopt ) {
2267
235
            continue;
2268
235
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
63
    return ret;
2274
63
}
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
2262
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
73
    ResultSet ret;
2264
2265
266
    for (const auto& result : results) {
2266
266
        if ( result.second == std::nullopt ) {
2267
266
            continue;
2268
266
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
73
    return ret;
2274
73
}
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
2262
74
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
74
    ResultSet ret;
2264
2265
271
    for (const auto& result : results) {
2266
271
        if ( result.second == std::nullopt ) {
2267
271
            continue;
2268
271
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
74
    return ret;
2274
74
}
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
2262
144
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
144
    ResultSet ret;
2264
2265
504
    for (const auto& result : results) {
2266
504
        if ( result.second == std::nullopt ) {
2267
423
            continue;
2268
423
        }
2269
2270
81
        ret.push_back(result);
2271
81
    }
2272
2273
144
    return ret;
2274
144
}
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
2262
1.04k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
1.04k
    ResultSet ret;
2264
2265
2.80k
    for (const auto& result : results) {
2266
2.80k
        if ( result.second == std::nullopt ) {
2267
2.53k
            continue;
2268
2.53k
        }
2269
2270
275
        ret.push_back(result);
2271
275
    }
2272
2273
1.04k
    return ret;
2274
1.04k
}
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
2262
139
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
139
    ResultSet ret;
2264
2265
462
    for (const auto& result : results) {
2266
462
        if ( result.second == std::nullopt ) {
2267
386
            continue;
2268
386
        }
2269
2270
76
        ret.push_back(result);
2271
76
    }
2272
2273
139
    return ret;
2274
139
}
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
2262
126
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
126
    ResultSet ret;
2264
2265
419
    for (const auto& result : results) {
2266
419
        if ( result.second == std::nullopt ) {
2267
375
            continue;
2268
375
        }
2269
2270
44
        ret.push_back(result);
2271
44
    }
2272
2273
126
    return ret;
2274
126
}
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
2262
156
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
156
    ResultSet ret;
2264
2265
538
    for (const auto& result : results) {
2266
538
        if ( result.second == std::nullopt ) {
2267
504
            continue;
2268
504
        }
2269
2270
34
        ret.push_back(result);
2271
34
    }
2272
2273
156
    return ret;
2274
156
}
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
2262
403
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
403
    ResultSet ret;
2264
2265
1.20k
    for (const auto& result : results) {
2266
1.20k
        if ( result.second == std::nullopt ) {
2267
1.10k
            continue;
2268
1.10k
        }
2269
2270
101
        ret.push_back(result);
2271
101
    }
2272
2273
403
    return ret;
2274
403
}
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
2262
12.3k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
12.3k
    ResultSet ret;
2264
2265
29.9k
    for (const auto& result : results) {
2266
29.9k
        if ( result.second == std::nullopt ) {
2267
22.2k
            continue;
2268
22.2k
        }
2269
2270
7.72k
        ret.push_back(result);
2271
7.72k
    }
2272
2273
12.3k
    return ret;
2274
12.3k
}
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
2262
131
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
131
    ResultSet ret;
2264
2265
415
    for (const auto& result : results) {
2266
415
        if ( result.second == std::nullopt ) {
2267
415
            continue;
2268
415
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
131
    return ret;
2274
131
}
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
2262
447
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
447
    ResultSet ret;
2264
2265
1.36k
    for (const auto& result : results) {
2266
1.36k
        if ( result.second == std::nullopt ) {
2267
1.36k
            continue;
2268
1.36k
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
447
    return ret;
2274
447
}
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
2262
84
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
84
    ResultSet ret;
2264
2265
303
    for (const auto& result : results) {
2266
303
        if ( result.second == std::nullopt ) {
2267
303
            continue;
2268
303
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
84
    return ret;
2274
84
}
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
2262
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
82
    ResultSet ret;
2264
2265
275
    for (const auto& result : results) {
2266
275
        if ( result.second == std::nullopt ) {
2267
275
            continue;
2268
275
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
82
    return ret;
2274
82
}
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
2262
74
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
74
    ResultSet ret;
2264
2265
253
    for (const auto& result : results) {
2266
253
        if ( result.second == std::nullopt ) {
2267
253
            continue;
2268
253
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
74
    return ret;
2274
74
}
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
2262
81
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
81
    ResultSet ret;
2264
2265
290
    for (const auto& result : results) {
2266
290
        if ( result.second == std::nullopt ) {
2267
290
            continue;
2268
290
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
81
    return ret;
2274
81
}
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
2262
88
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
88
    ResultSet ret;
2264
2265
302
    for (const auto& result : results) {
2266
302
        if ( result.second == std::nullopt ) {
2267
302
            continue;
2268
302
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
88
    return ret;
2274
88
}
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
2262
83
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
83
    ResultSet ret;
2264
2265
285
    for (const auto& result : results) {
2266
285
        if ( result.second == std::nullopt ) {
2267
285
            continue;
2268
285
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
83
    return ret;
2274
83
}
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
2262
77
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
77
    ResultSet ret;
2264
2265
266
    for (const auto& result : results) {
2266
266
        if ( result.second == std::nullopt ) {
2267
266
            continue;
2268
266
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
77
    return ret;
2274
77
}
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
2262
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
65
    ResultSet ret;
2264
2265
238
    for (const auto& result : results) {
2266
238
        if ( result.second == std::nullopt ) {
2267
238
            continue;
2268
238
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
65
    return ret;
2274
65
}
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
2262
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
56
    ResultSet ret;
2264
2265
209
    for (const auto& result : results) {
2266
209
        if ( result.second == std::nullopt ) {
2267
209
            continue;
2268
209
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
56
    return ret;
2274
56
}
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
2262
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
62
    ResultSet ret;
2264
2265
224
    for (const auto& result : results) {
2266
224
        if ( result.second == std::nullopt ) {
2267
224
            continue;
2268
224
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
62
    return ret;
2274
62
}
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
2262
92
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
92
    ResultSet ret;
2264
2265
314
    for (const auto& result : results) {
2266
314
        if ( result.second == std::nullopt ) {
2267
314
            continue;
2268
314
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
92
    return ret;
2274
92
}
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
2262
74
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
74
    ResultSet ret;
2264
2265
256
    for (const auto& result : results) {
2266
256
        if ( result.second == std::nullopt ) {
2267
256
            continue;
2268
256
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
74
    return ret;
2274
74
}
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
2262
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
73
    ResultSet ret;
2264
2265
247
    for (const auto& result : results) {
2266
247
        if ( result.second == std::nullopt ) {
2267
247
            continue;
2268
247
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
73
    return ret;
2274
73
}
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
2262
87
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
87
    ResultSet ret;
2264
2265
306
    for (const auto& result : results) {
2266
306
        if ( result.second == std::nullopt ) {
2267
306
            continue;
2268
306
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
87
    return ret;
2274
87
}
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
2262
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
69
    ResultSet ret;
2264
2265
248
    for (const auto& result : results) {
2266
248
        if ( result.second == std::nullopt ) {
2267
248
            continue;
2268
248
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
69
    return ret;
2274
69
}
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
2262
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
72
    ResultSet ret;
2264
2265
247
    for (const auto& result : results) {
2266
247
        if ( result.second == std::nullopt ) {
2267
247
            continue;
2268
247
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
72
    return ret;
2274
72
}
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
2262
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
97
    ResultSet ret;
2264
2265
307
    for (const auto& result : results) {
2266
307
        if ( result.second == std::nullopt ) {
2267
307
            continue;
2268
307
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
97
    return ret;
2274
97
}
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
2262
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
82
    ResultSet ret;
2264
2265
284
    for (const auto& result : results) {
2266
284
        if ( result.second == std::nullopt ) {
2267
284
            continue;
2268
284
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
82
    return ret;
2274
82
}
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
2262
63
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
63
    ResultSet ret;
2264
2265
227
    for (const auto& result : results) {
2266
227
        if ( result.second == std::nullopt ) {
2267
227
            continue;
2268
227
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
63
    return ret;
2274
63
}
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
2262
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
69
    ResultSet ret;
2264
2265
240
    for (const auto& result : results) {
2266
240
        if ( result.second == std::nullopt ) {
2267
240
            continue;
2268
240
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
69
    return ret;
2274
69
}
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
2262
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
62
    ResultSet ret;
2264
2265
225
    for (const auto& result : results) {
2266
225
        if ( result.second == std::nullopt ) {
2267
225
            continue;
2268
225
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
62
    return ret;
2274
62
}
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
2262
68
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
68
    ResultSet ret;
2264
2265
258
    for (const auto& result : results) {
2266
258
        if ( result.second == std::nullopt ) {
2267
258
            continue;
2268
258
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
68
    return ret;
2274
68
}
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
2262
101
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
101
    ResultSet ret;
2264
2265
328
    for (const auto& result : results) {
2266
328
        if ( result.second == std::nullopt ) {
2267
328
            continue;
2268
328
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
101
    return ret;
2274
101
}
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
2262
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
79
    ResultSet ret;
2264
2265
258
    for (const auto& result : results) {
2266
258
        if ( result.second == std::nullopt ) {
2267
258
            continue;
2268
258
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
79
    return ret;
2274
79
}
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
2262
99
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
99
    ResultSet ret;
2264
2265
322
    for (const auto& result : results) {
2266
322
        if ( result.second == std::nullopt ) {
2267
322
            continue;
2268
322
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
99
    return ret;
2274
99
}
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
2262
85
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
85
    ResultSet ret;
2264
2265
281
    for (const auto& result : results) {
2266
281
        if ( result.second == std::nullopt ) {
2267
281
            continue;
2268
281
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
85
    return ret;
2274
85
}
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
2262
150
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
150
    ResultSet ret;
2264
2265
450
    for (const auto& result : results) {
2266
450
        if ( result.second == std::nullopt ) {
2267
450
            continue;
2268
450
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
150
    return ret;
2274
150
}
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
2262
117
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
117
    ResultSet ret;
2264
2265
362
    for (const auto& result : results) {
2266
362
        if ( result.second == std::nullopt ) {
2267
362
            continue;
2268
362
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
117
    return ret;
2274
117
}
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
2262
125
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
125
    ResultSet ret;
2264
2265
398
    for (const auto& result : results) {
2266
398
        if ( result.second == std::nullopt ) {
2267
398
            continue;
2268
398
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
125
    return ret;
2274
125
}
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
2262
113
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
113
    ResultSet ret;
2264
2265
357
    for (const auto& result : results) {
2266
357
        if ( result.second == std::nullopt ) {
2267
357
            continue;
2268
357
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
113
    return ret;
2274
113
}
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
2262
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
58
    ResultSet ret;
2264
2265
222
    for (const auto& result : results) {
2266
222
        if ( result.second == std::nullopt ) {
2267
222
            continue;
2268
222
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
58
    return ret;
2274
58
}
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
2262
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2263
67
    ResultSet ret;
2264
2265
239
    for (const auto& result : results) {
2266
239
        if ( result.second == std::nullopt ) {
2267
239
            continue;
2268
239
        }
2269
2270
0
        ret.push_back(result);
2271
0
    }
2272
2273
67
    return ret;
2274
67
}
2275
2276
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2277
template <>
2278
1.34k
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 {
2279
1.34k
    (void)operations;
2280
1.34k
    (void)results;
2281
1.34k
    (void)data;
2282
1.34k
    (void)size;
2283
1.34k
}
2284
2285
template <class ResultType, class OperationType>
2286
4.43k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
4.43k
    (void)operation;
2288
2289
4.43k
    return false;
2290
4.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2286
953
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
953
    (void)operation;
2288
2289
953
    return false;
2290
953
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2286
394
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
394
    (void)operation;
2288
2289
394
    return false;
2290
394
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2286
51
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
51
    (void)operation;
2288
2289
51
    return false;
2290
51
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2286
1.05k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
1.05k
    (void)operation;
2288
2289
1.05k
    return false;
2290
1.05k
}
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
2286
263
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
263
    (void)operation;
2288
2289
263
    return false;
2290
263
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2286
89
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
89
    (void)operation;
2288
2289
89
    return false;
2290
89
}
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
2286
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
10
    (void)operation;
2288
2289
10
    return false;
2290
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2286
153
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
153
    (void)operation;
2288
2289
153
    return false;
2290
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2286
328
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
328
    (void)operation;
2288
2289
328
    return false;
2290
328
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2286
504
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
504
    (void)operation;
2288
2289
504
    return false;
2290
504
}
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
2286
269
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
269
    (void)operation;
2288
2289
269
    return false;
2290
269
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2286
68
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
68
    (void)operation;
2288
2289
68
    return false;
2290
68
}
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
2286
141
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
141
    (void)operation;
2288
2289
141
    return false;
2290
141
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
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
2286
25
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
25
    (void)operation;
2288
2289
25
    return false;
2290
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2286
79
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
79
    (void)operation;
2288
2289
79
    return false;
2290
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2286
22
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
22
    (void)operation;
2288
2289
22
    return false;
2290
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2286
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
10
    (void)operation;
2288
2289
10
    return false;
2290
10
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2286
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
9
    (void)operation;
2288
2289
9
    return false;
2290
9
}
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
2286
19
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2287
19
    (void)operation;
2288
2289
19
    return false;
2290
19
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2291
2292
template <>
2293
1.61k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2294
1.61k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2295
1.61k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2296
2297
1.39k
    return false;
2298
1.61k
}
2299
2300
template <>
2301
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2302
0
    return true;
2303
0
}
2304
2305
template <>
2306
289
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2307
289
    if (
2308
289
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2309
289
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2310
183
        if ( operation.UseRandomNonce() ) {
2311
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2312
137
            return true;
2313
137
        }
2314
183
    }
2315
2316
152
    return false;
2317
289
}
2318
2319
template <>
2320
32
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2321
32
    if (
2322
32
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2323
32
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2324
32
        if ( operation.UseRandomNonce() ) {
2325
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2326
32
            return true;
2327
32
        }
2328
32
    }
2329
2330
0
    return false;
2331
32
}
2332
2333
template <>
2334
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2335
0
    if (
2336
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2337
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2338
0
        if ( operation.UseRandomNonce() ) {
2339
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2340
0
            return true;
2341
0
        }
2342
0
    }
2343
2344
0
    return false;
2345
0
}
2346
2347
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2348
template <>
2349
1.41k
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2350
1.41k
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2351
2352
1.41k
    return false;
2353
1.41k
}
2354
2355
template <>
2356
256
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2357
256
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2358
2359
256
    return false;
2360
256
}
2361
2362
template <>
2363
387
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2364
387
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2365
2366
387
    return false;
2367
387
}
2368
2369
template <>
2370
438
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2371
438
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2372
2373
436
    return false;
2374
438
}
2375
2376
template <class ResultType, class OperationType>
2377
49.9k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
49.9k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
49.9k
    const auto filtered = filter(results);
2384
2385
49.9k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
41.1k
        return;
2388
41.1k
    }
2389
2390
8.87k
    if ( dontCompare(operations[0].second) == true ) {
2391
396
        return;
2392
396
    }
2393
2394
37.7k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
29.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
29.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
29.3k
        const bool equal = *prev == *cur;
2399
2400
29.3k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
29.3k
    }
2417
8.47k
}
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
2377
3.83k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
3.83k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
3.83k
    const auto filtered = filter(results);
2384
2385
3.83k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
2.87k
        return;
2388
2.87k
    }
2389
2390
953
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
4.20k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
3.25k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
3.25k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
3.25k
        const bool equal = *prev == *cur;
2399
2400
3.25k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
3.25k
    }
2417
953
}
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
2377
1.52k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.52k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.52k
    const auto filtered = filter(results);
2384
2385
1.52k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.08k
        return;
2388
1.08k
    }
2389
2390
438
    if ( dontCompare(operations[0].second) == true ) {
2391
2
        return;
2392
2
    }
2393
2394
2.21k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.77k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.77k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.77k
        const bool equal = *prev == *cur;
2399
2400
1.77k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.77k
    }
2417
436
}
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
2377
1.02k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.02k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.02k
    const auto filtered = filter(results);
2384
2385
1.02k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
631
        return;
2388
631
    }
2389
2390
394
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
2.73k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
2.34k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
2.34k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
2.34k
        const bool equal = *prev == *cur;
2399
2400
2.34k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
2.34k
    }
2417
394
}
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
2377
1.43k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.43k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.43k
    const auto filtered = filter(results);
2384
2385
1.43k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.04k
        return;
2388
1.04k
    }
2389
2390
387
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
2.43k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
2.04k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
2.04k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
2.04k
        const bool equal = *prev == *cur;
2399
2400
2.04k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
2.04k
    }
2417
387
}
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
2377
5.99k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
5.99k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
5.99k
    const auto filtered = filter(results);
2384
2385
5.99k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
4.57k
        return;
2388
4.57k
    }
2389
2390
1.41k
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
8.89k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
7.47k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
7.47k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
7.47k
        const bool equal = *prev == *cur;
2399
2400
7.47k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
7.47k
    }
2417
1.41k
}
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
2377
5.77k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
5.77k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
5.77k
    const auto filtered = filter(results);
2384
2385
5.77k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
5.51k
        return;
2388
5.51k
    }
2389
2390
256
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.50k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.25k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.25k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.25k
        const bool equal = *prev == *cur;
2399
2400
1.25k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.25k
    }
2417
256
}
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
2377
240
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
240
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
240
    const auto filtered = filter(results);
2384
2385
240
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
189
        return;
2388
189
    }
2389
2390
51
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
374
    for (size_t i = 1; i < filtered.size(); i++) {
2395
323
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
323
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
323
        const bool equal = *prev == *cur;
2399
2400
323
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
323
    }
2417
51
}
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
2377
3.51k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
3.51k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
3.51k
    const auto filtered = filter(results);
2384
2385
3.51k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
2.46k
        return;
2388
2.46k
    }
2389
2390
1.05k
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
4.19k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
3.14k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
3.14k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
3.14k
        const bool equal = *prev == *cur;
2399
2400
3.14k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
3.14k
    }
2417
1.05k
}
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
2377
198
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
198
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
198
    const auto filtered = filter(results);
2384
2385
198
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
198
        return;
2388
198
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
99
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
99
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
99
    const auto filtered = filter(results);
2384
2385
99
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
99
        return;
2388
99
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
124
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
124
    const auto filtered = filter(results);
2384
2385
124
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
124
        return;
2388
124
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
804
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
804
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
804
    const auto filtered = filter(results);
2384
2385
804
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
541
        return;
2388
541
    }
2389
2390
263
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.31k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
1.04k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
1.04k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
1.04k
        const bool equal = *prev == *cur;
2399
2400
1.04k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
1.04k
    }
2417
263
}
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
2377
497
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
497
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
497
    const auto filtered = filter(results);
2384
2385
497
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
408
        return;
2388
408
    }
2389
2390
89
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
237
    for (size_t i = 1; i < filtered.size(); i++) {
2395
148
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
148
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
148
        const bool equal = *prev == *cur;
2399
2400
148
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
148
    }
2417
89
}
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
2377
118
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
118
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
118
    const auto filtered = filter(results);
2384
2385
118
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
118
        return;
2388
118
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
97
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
97
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
97
    const auto filtered = filter(results);
2384
2385
97
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
97
        return;
2388
97
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
132
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
132
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
132
    const auto filtered = filter(results);
2384
2385
132
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
122
        return;
2388
122
    }
2389
2390
10
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
20
    for (size_t i = 1; i < filtered.size(); i++) {
2395
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
10
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
10
        const bool equal = *prev == *cur;
2399
2400
10
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
10
    }
2417
10
}
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
2377
615
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
615
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
615
    const auto filtered = filter(results);
2384
2385
615
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
462
        return;
2388
462
    }
2389
2390
153
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
943
    for (size_t i = 1; i < filtered.size(); i++) {
2395
790
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
790
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
790
        const bool equal = *prev == *cur;
2399
2400
790
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
790
    }
2417
153
}
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
2377
1.62k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.62k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.62k
    const auto filtered = filter(results);
2384
2385
1.62k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
1.29k
        return;
2388
1.29k
    }
2389
2390
328
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
843
    for (size_t i = 1; i < filtered.size(); i++) {
2395
515
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
515
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
515
        const bool equal = *prev == *cur;
2399
2400
515
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
515
    }
2417
328
}
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
2377
720
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
720
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
720
    const auto filtered = filter(results);
2384
2385
720
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
216
        return;
2388
216
    }
2389
2390
504
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
1.16k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
665
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
665
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
665
        const bool equal = *prev == *cur;
2399
2400
665
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
665
    }
2417
504
}
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
2377
93
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
93
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
93
    const auto filtered = filter(results);
2384
2385
93
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
93
        return;
2388
93
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
1.19k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.19k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.19k
    const auto filtered = filter(results);
2384
2385
1.19k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
904
        return;
2388
904
    }
2389
2390
289
    if ( dontCompare(operations[0].second) == true ) {
2391
137
        return;
2392
137
    }
2393
2394
537
    for (size_t i = 1; i < filtered.size(); i++) {
2395
385
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
385
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
385
        const bool equal = *prev == *cur;
2399
2400
385
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
385
    }
2417
152
}
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
2377
299
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
299
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
299
    const auto filtered = filter(results);
2384
2385
299
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
267
        return;
2388
267
    }
2389
2390
32
    if ( dontCompare(operations[0].second) == true ) {
2391
32
        return;
2392
32
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
87
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
87
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
87
    const auto filtered = filter(results);
2384
2385
87
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
87
        return;
2388
87
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
79
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
79
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
79
    const auto filtered = filter(results);
2384
2385
79
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
79
        return;
2388
79
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
68
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
68
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
68
    const auto filtered = filter(results);
2384
2385
68
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
68
        return;
2388
68
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
549
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
549
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
549
    const auto filtered = filter(results);
2384
2385
549
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
280
        return;
2388
280
    }
2389
2390
269
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
769
    for (size_t i = 1; i < filtered.size(); i++) {
2395
500
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
500
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
500
        const bool equal = *prev == *cur;
2399
2400
500
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
500
    }
2417
269
}
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
2377
235
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
235
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
235
    const auto filtered = filter(results);
2384
2385
235
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
167
        return;
2388
167
    }
2389
2390
68
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
207
    for (size_t i = 1; i < filtered.size(); i++) {
2395
139
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
139
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
139
        const bool equal = *prev == *cur;
2399
2400
139
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
139
    }
2417
68
}
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
2377
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
59
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
59
    const auto filtered = filter(results);
2384
2385
59
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
59
        return;
2388
59
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
66
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
66
    const auto filtered = filter(results);
2384
2385
66
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
66
        return;
2388
66
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
1.00k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.00k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.00k
    const auto filtered = filter(results);
2384
2385
1.00k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
859
        return;
2388
859
    }
2389
2390
141
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
426
    for (size_t i = 1; i < filtered.size(); i++) {
2395
285
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
285
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
285
        const bool equal = *prev == *cur;
2399
2400
285
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
285
    }
2417
141
}
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
2377
94
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
94
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
94
    const auto filtered = filter(results);
2384
2385
94
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
94
        return;
2388
94
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2377
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
63
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
63
    const auto filtered = filter(results);
2384
2385
63
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
63
        return;
2388
63
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
73
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
73
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
73
    const auto filtered = filter(results);
2384
2385
73
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
73
        return;
2388
73
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
74
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
74
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
74
    const auto filtered = filter(results);
2384
2385
74
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
74
        return;
2388
74
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
144
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
144
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
144
    const auto filtered = filter(results);
2384
2385
144
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
119
        return;
2388
119
    }
2389
2390
25
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
74
    for (size_t i = 1; i < filtered.size(); i++) {
2395
49
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
49
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
49
        const bool equal = *prev == *cur;
2399
2400
49
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
49
    }
2417
25
}
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
2377
1.04k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
1.04k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
1.04k
    const auto filtered = filter(results);
2384
2385
1.04k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
968
        return;
2388
968
    }
2389
2390
79
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
240
    for (size_t i = 1; i < filtered.size(); i++) {
2395
161
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
161
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
161
        const bool equal = *prev == *cur;
2399
2400
161
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
161
    }
2417
79
}
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
2377
139
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
139
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
139
    const auto filtered = filter(results);
2384
2385
139
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
117
        return;
2388
117
    }
2389
2390
22
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
66
    for (size_t i = 1; i < filtered.size(); i++) {
2395
44
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
44
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
44
        const bool equal = *prev == *cur;
2399
2400
44
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
44
    }
2417
22
}
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
2377
126
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
126
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
126
    const auto filtered = filter(results);
2384
2385
126
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
116
        return;
2388
116
    }
2389
2390
10
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
33
    for (size_t i = 1; i < filtered.size(); i++) {
2395
23
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
23
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
23
        const bool equal = *prev == *cur;
2399
2400
23
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
23
    }
2417
10
}
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
2377
156
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
156
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
156
    const auto filtered = filter(results);
2384
2385
156
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
147
        return;
2388
147
    }
2389
2390
9
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
32
    for (size_t i = 1; i < filtered.size(); i++) {
2395
23
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
23
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
23
        const bool equal = *prev == *cur;
2399
2400
23
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
23
    }
2417
9
}
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
2377
403
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
403
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
403
    const auto filtered = filter(results);
2384
2385
403
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
384
        return;
2388
384
    }
2389
2390
19
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
62
    for (size_t i = 1; i < filtered.size(); i++) {
2395
43
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
43
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
43
        const bool equal = *prev == *cur;
2399
2400
43
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
43
    }
2417
19
}
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
2377
12.3k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
12.3k
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
12.3k
    const auto filtered = filter(results);
2384
2385
12.3k
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
10.7k
        return;
2388
10.7k
    }
2389
2390
1.61k
    if ( dontCompare(operations[0].second) == true ) {
2391
225
        return;
2392
225
    }
2393
2394
4.26k
    for (size_t i = 1; i < filtered.size(); i++) {
2395
2.87k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
2.87k
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
2.87k
        const bool equal = *prev == *cur;
2399
2400
2.87k
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
2.87k
    }
2417
1.39k
}
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
2377
131
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
131
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
131
    const auto filtered = filter(results);
2384
2385
131
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
131
        return;
2388
131
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
447
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
447
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
447
    const auto filtered = filter(results);
2384
2385
447
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
447
        return;
2388
447
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
84
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
84
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
84
    const auto filtered = filter(results);
2384
2385
84
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
84
        return;
2388
84
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
82
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
82
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
82
    const auto filtered = filter(results);
2384
2385
82
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
82
        return;
2388
82
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
74
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
74
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
74
    const auto filtered = filter(results);
2384
2385
74
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
74
        return;
2388
74
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
81
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
81
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
81
    const auto filtered = filter(results);
2384
2385
81
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
81
        return;
2388
81
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
88
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
88
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
88
    const auto filtered = filter(results);
2384
2385
88
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
88
        return;
2388
88
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
83
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
83
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
83
    const auto filtered = filter(results);
2384
2385
83
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
83
        return;
2388
83
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
77
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
77
    const auto filtered = filter(results);
2384
2385
77
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
77
        return;
2388
77
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
65
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
65
    const auto filtered = filter(results);
2384
2385
65
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
65
        return;
2388
65
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
56
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
56
    const auto filtered = filter(results);
2384
2385
56
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
56
        return;
2388
56
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
62
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
62
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
62
    const auto filtered = filter(results);
2384
2385
62
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
62
        return;
2388
62
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
92
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
92
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
92
    const auto filtered = filter(results);
2384
2385
92
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
92
        return;
2388
92
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
74
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
74
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
74
    const auto filtered = filter(results);
2384
2385
74
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
74
        return;
2388
74
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
73
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
73
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
73
    const auto filtered = filter(results);
2384
2385
73
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
73
        return;
2388
73
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
87
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
87
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
87
    const auto filtered = filter(results);
2384
2385
87
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
87
        return;
2388
87
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
69
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
69
    const auto filtered = filter(results);
2384
2385
69
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
69
        return;
2388
69
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
72
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
72
    const auto filtered = filter(results);
2384
2385
72
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
72
        return;
2388
72
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
97
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
97
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
97
    const auto filtered = filter(results);
2384
2385
97
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
97
        return;
2388
97
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
82
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
82
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
82
    const auto filtered = filter(results);
2384
2385
82
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
82
        return;
2388
82
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
63
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
63
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
63
    const auto filtered = filter(results);
2384
2385
63
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
63
        return;
2388
63
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
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 {
2378
69
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
69
    const auto filtered = filter(results);
2384
2385
69
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
69
        return;
2388
69
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
62
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
62
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
62
    const auto filtered = filter(results);
2384
2385
62
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
62
        return;
2388
62
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
68
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
68
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
68
    const auto filtered = filter(results);
2384
2385
68
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
68
        return;
2388
68
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
101
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
101
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
101
    const auto filtered = filter(results);
2384
2385
101
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
101
        return;
2388
101
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
79
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
79
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
79
    const auto filtered = filter(results);
2384
2385
79
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
79
        return;
2388
79
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
99
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
99
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
99
    const auto filtered = filter(results);
2384
2385
99
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
99
        return;
2388
99
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
85
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
85
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
85
    const auto filtered = filter(results);
2384
2385
85
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
85
        return;
2388
85
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
150
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
150
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
150
    const auto filtered = filter(results);
2384
2385
150
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
150
        return;
2388
150
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
117
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
117
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
117
    const auto filtered = filter(results);
2384
2385
117
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
117
        return;
2388
117
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
125
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
125
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
125
    const auto filtered = filter(results);
2384
2385
125
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
125
        return;
2388
125
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
113
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
113
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
113
    const auto filtered = filter(results);
2384
2385
113
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
113
        return;
2388
113
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
58
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
58
    const auto filtered = filter(results);
2384
2385
58
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
58
        return;
2388
58
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
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
2377
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2378
67
    if ( results.size() < 2 ) {
2379
        /* Nothing to compare. Don't even bother filtering. */
2380
0
        return;
2381
0
    }
2382
2383
67
    const auto filtered = filter(results);
2384
2385
67
    if ( filtered.size() < 2 ) {
2386
        /* Nothing to compare */
2387
67
        return;
2388
67
    }
2389
2390
0
    if ( dontCompare(operations[0].second) == true ) {
2391
0
        return;
2392
0
    }
2393
2394
0
    for (size_t i = 1; i < filtered.size(); i++) {
2395
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2396
0
        const std::optional<ResultType>& cur = filtered[i].second;
2397
2398
0
        const bool equal = *prev == *cur;
2399
2400
0
        if ( !equal ) {
2401
            /* Reconstruct operation */
2402
0
            const auto op = getOp(nullptr, data, size);
2403
2404
0
            printf("Difference detected\n\n");
2405
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2406
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2407
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2408
2409
0
            abort(
2410
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2411
0
                    op.Name(),
2412
0
                    op.GetAlgorithmString(),
2413
0
                    "difference"
2414
0
            );
2415
0
        }
2416
0
    }
2417
0
}
2418
2419
template <class ResultType, class OperationType>
2420
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2421
0
    std::sort(moduleNames.begin(), moduleNames.end());
2422
2423
0
    printf("CPU:\n");
2424
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2425
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2426
2427
0
    printf("Assertion failure: ");
2428
0
    for (const auto& moduleName : moduleNames) {
2429
0
        printf("%s-", moduleName.c_str());
2430
0
    }
2431
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2432
0
    fflush(stdout);
2433
2434
0
    ::abort();
2435
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_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::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
2436
2437
template <class ResultType, class OperationType>
2438
465k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
465k
    (void)parentDs;
2440
465k
    return std::move(op);
2441
465k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2438
11.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
11.1k
    (void)parentDs;
2440
11.1k
    return std::move(op);
2441
11.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2438
8.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
8.03k
    (void)parentDs;
2440
8.03k
    return std::move(op);
2441
8.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2438
10.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
10.6k
    (void)parentDs;
2440
10.6k
    return std::move(op);
2441
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2438
9.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
9.44k
    (void)parentDs;
2440
9.44k
    return std::move(op);
2441
9.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2438
32.4k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
32.4k
    (void)parentDs;
2440
32.4k
    return std::move(op);
2441
32.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2438
23.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
23.5k
    (void)parentDs;
2440
23.5k
    return std::move(op);
2441
23.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2438
5.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.72k
    (void)parentDs;
2440
5.72k
    return std::move(op);
2441
5.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2438
13.0k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
13.0k
    (void)parentDs;
2440
13.0k
    return std::move(op);
2441
13.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2438
5.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.62k
    (void)parentDs;
2440
5.62k
    return std::move(op);
2441
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2438
4.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.83k
    (void)parentDs;
2440
4.83k
    return std::move(op);
2441
4.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2438
4.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.73k
    (void)parentDs;
2440
4.73k
    return std::move(op);
2441
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2438
7.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
7.43k
    (void)parentDs;
2440
7.43k
    return std::move(op);
2441
7.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2438
4.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.97k
    (void)parentDs;
2440
4.97k
    return std::move(op);
2441
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2438
4.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.78k
    (void)parentDs;
2440
4.78k
    return std::move(op);
2441
4.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2438
4.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.97k
    (void)parentDs;
2440
4.97k
    return std::move(op);
2441
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2438
4.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.14k
    (void)parentDs;
2440
4.14k
    return std::move(op);
2441
4.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2438
7.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
7.09k
    (void)parentDs;
2440
7.09k
    return std::move(op);
2441
7.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2438
5.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.51k
    (void)parentDs;
2440
5.51k
    return std::move(op);
2441
5.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2438
4.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.23k
    (void)parentDs;
2440
4.23k
    return std::move(op);
2441
4.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2438
5.59k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.59k
    (void)parentDs;
2440
5.59k
    return std::move(op);
2441
5.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2438
4.76k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.76k
    (void)parentDs;
2440
4.76k
    return std::move(op);
2441
4.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2438
7.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
7.12k
    (void)parentDs;
2440
7.12k
    return std::move(op);
2441
7.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2438
5.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.34k
    (void)parentDs;
2440
5.34k
    return std::move(op);
2441
5.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2438
4.90k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.90k
    (void)parentDs;
2440
4.90k
    return std::move(op);
2441
4.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2438
5.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.44k
    (void)parentDs;
2440
5.44k
    return std::move(op);
2441
5.44k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2438
5.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.46k
    (void)parentDs;
2440
5.46k
    return std::move(op);
2441
5.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2438
4.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.62k
    (void)parentDs;
2440
4.62k
    return std::move(op);
2441
4.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2438
4.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.57k
    (void)parentDs;
2440
4.57k
    return std::move(op);
2441
4.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2438
3.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.78k
    (void)parentDs;
2440
3.78k
    return std::move(op);
2441
3.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2438
4.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.73k
    (void)parentDs;
2440
4.73k
    return std::move(op);
2441
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2438
5.96k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.96k
    (void)parentDs;
2440
5.96k
    return std::move(op);
2441
5.96k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2438
4.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.48k
    (void)parentDs;
2440
4.48k
    return std::move(op);
2441
4.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2438
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.67k
    (void)parentDs;
2440
4.67k
    return std::move(op);
2441
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2438
3.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.27k
    (void)parentDs;
2440
3.27k
    return std::move(op);
2441
3.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2438
4.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.86k
    (void)parentDs;
2440
4.86k
    return std::move(op);
2441
4.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2438
5.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.01k
    (void)parentDs;
2440
5.01k
    return std::move(op);
2441
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2438
4.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.04k
    (void)parentDs;
2440
4.04k
    return std::move(op);
2441
4.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2438
5.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.22k
    (void)parentDs;
2440
5.22k
    return std::move(op);
2441
5.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2438
5.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.24k
    (void)parentDs;
2440
5.24k
    return std::move(op);
2441
5.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2438
3.96k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.96k
    (void)parentDs;
2440
3.96k
    return std::move(op);
2441
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2438
6.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
6.69k
    (void)parentDs;
2440
6.69k
    return std::move(op);
2441
6.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2438
3.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.74k
    (void)parentDs;
2440
3.74k
    return std::move(op);
2441
3.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2438
3.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.25k
    (void)parentDs;
2440
3.25k
    return std::move(op);
2441
3.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2438
5.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.49k
    (void)parentDs;
2440
5.49k
    return std::move(op);
2441
5.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2438
4.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.75k
    (void)parentDs;
2440
4.75k
    return std::move(op);
2441
4.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2438
5.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.51k
    (void)parentDs;
2440
5.51k
    return std::move(op);
2441
5.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2438
19.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
19.1k
    (void)parentDs;
2440
19.1k
    return std::move(op);
2441
19.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2438
4.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.12k
    (void)parentDs;
2440
4.12k
    return std::move(op);
2441
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2438
5.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.92k
    (void)parentDs;
2440
5.92k
    return std::move(op);
2441
5.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2438
3.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.23k
    (void)parentDs;
2440
3.23k
    return std::move(op);
2441
3.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2438
3.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.20k
    (void)parentDs;
2440
3.20k
    return std::move(op);
2441
3.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2438
4.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.34k
    (void)parentDs;
2440
4.34k
    return std::move(op);
2441
4.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2438
4.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.61k
    (void)parentDs;
2440
4.61k
    return std::move(op);
2441
4.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2438
4.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.23k
    (void)parentDs;
2440
4.23k
    return std::move(op);
2441
4.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2438
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.49k
    (void)parentDs;
2440
3.49k
    return std::move(op);
2441
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2438
3.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.52k
    (void)parentDs;
2440
3.52k
    return std::move(op);
2441
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2438
3.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.89k
    (void)parentDs;
2440
3.89k
    return std::move(op);
2441
3.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2438
4.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.88k
    (void)parentDs;
2440
4.88k
    return std::move(op);
2441
4.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2438
3.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.98k
    (void)parentDs;
2440
3.98k
    return std::move(op);
2441
3.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2438
4.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.21k
    (void)parentDs;
2440
4.21k
    return std::move(op);
2441
4.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2438
4.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.39k
    (void)parentDs;
2440
4.39k
    return std::move(op);
2441
4.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2438
4.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.91k
    (void)parentDs;
2440
4.91k
    return std::move(op);
2441
4.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2438
4.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.46k
    (void)parentDs;
2440
4.46k
    return std::move(op);
2441
4.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2438
4.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.04k
    (void)parentDs;
2440
4.04k
    return std::move(op);
2441
4.04k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2438
3.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.43k
    (void)parentDs;
2440
3.43k
    return std::move(op);
2441
3.43k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2438
4.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.26k
    (void)parentDs;
2440
4.26k
    return std::move(op);
2441
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2438
4.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.92k
    (void)parentDs;
2440
4.92k
    return std::move(op);
2441
4.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2438
3.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.86k
    (void)parentDs;
2440
3.86k
    return std::move(op);
2441
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2438
3.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.79k
    (void)parentDs;
2440
3.79k
    return std::move(op);
2441
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2438
3.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.40k
    (void)parentDs;
2440
3.40k
    return std::move(op);
2441
3.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2438
3.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.86k
    (void)parentDs;
2440
3.86k
    return std::move(op);
2441
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2438
3.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.84k
    (void)parentDs;
2440
3.84k
    return std::move(op);
2441
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2438
3.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.68k
    (void)parentDs;
2440
3.68k
    return std::move(op);
2441
3.68k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2438
4.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.98k
    (void)parentDs;
2440
4.98k
    return std::move(op);
2441
4.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2438
3.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.57k
    (void)parentDs;
2440
3.57k
    return std::move(op);
2441
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2438
4.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.30k
    (void)parentDs;
2440
4.30k
    return std::move(op);
2441
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2438
5.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
5.23k
    (void)parentDs;
2440
5.23k
    return std::move(op);
2441
5.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2438
4.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.42k
    (void)parentDs;
2440
4.42k
    return std::move(op);
2441
4.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2438
4.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.49k
    (void)parentDs;
2440
4.49k
    return std::move(op);
2441
4.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2438
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
3.11k
    (void)parentDs;
2440
3.11k
    return std::move(op);
2441
3.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2438
4.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2439
4.39k
    (void)parentDs;
2440
4.39k
    return std::move(op);
2441
4.39k
}
2442
2443
730
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2444
730
    (void)parentDs;
2445
730
    op.modulo = modulo;
2446
730
    return op;
2447
730
}
2448
2449
650
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2450
650
    (void)parentDs;
2451
650
    op.modulo = modulo;
2452
650
    return op;
2453
650
}
2454
2455
498
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2456
498
    (void)parentDs;
2457
498
    op.modulo = modulo;
2458
498
    return op;
2459
498
}
2460
2461
812
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2462
812
    (void)parentDs;
2463
812
    op.modulo = modulo;
2464
812
    return op;
2465
812
}
2466
2467
775
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2468
775
    (void)parentDs;
2469
775
    op.modulo = modulo;
2470
775
    return op;
2471
775
}
2472
2473
551
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2474
551
    (void)parentDs;
2475
551
    op.modulo = modulo;
2476
551
    return op;
2477
551
}
2478
2479
598
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2480
598
    (void)parentDs;
2481
598
    op.modulo = modulo;
2482
598
    return op;
2483
598
}
2484
2485
649
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2486
649
    (void)parentDs;
2487
649
    op.modulo = modulo;
2488
649
    return op;
2489
649
}
2490
2491
637
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2492
637
    (void)parentDs;
2493
637
    op.modulo = modulo;
2494
637
    return op;
2495
637
}
2496
2497
762
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2498
762
    (void)parentDs;
2499
762
    op.modulo = modulo;
2500
762
    return op;
2501
762
}
2502
2503
471
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2504
471
    (void)parentDs;
2505
471
    op.modulo = modulo;
2506
471
    return op;
2507
471
}
2508
2509
501
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2510
501
    (void)parentDs;
2511
501
    op.modulo = modulo;
2512
501
    return op;
2513
501
}
2514
2515
485
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2516
485
    (void)parentDs;
2517
485
    op.modulo = modulo;
2518
485
    return op;
2519
485
}
2520
2521
1.02k
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2522
1.02k
    (void)parentDs;
2523
1.02k
    op.modulo = modulo;
2524
1.02k
    return op;
2525
1.02k
}
2526
2527
1.31k
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2528
1.31k
    (void)parentDs;
2529
1.31k
    op.modulo = modulo;
2530
1.31k
    return op;
2531
1.31k
}
2532
2533
676
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2534
676
    (void)parentDs;
2535
676
    op.modulo = modulo;
2536
676
    return op;
2537
676
}
2538
2539
549
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2540
549
    (void)parentDs;
2541
549
    op.modulo = modulo;
2542
549
    return op;
2543
549
}
2544
2545
739
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2546
739
    (void)parentDs;
2547
739
    op.modulo = modulo;
2548
739
    return op;
2549
739
}
2550
2551
480
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2552
480
    (void)parentDs;
2553
480
    op.modulo = modulo;
2554
480
    return op;
2555
480
}
2556
2557
template <class ResultType, class OperationType>
2558
482k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
482k
    Datasource ds(data, size);
2560
482k
    if ( parentDs != nullptr ) {
2561
482k
        auto modifier = parentDs->GetData(0);
2562
482k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
482k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
482k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
11.1k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
11.1k
    Datasource ds(data, size);
2560
11.1k
    if ( parentDs != nullptr ) {
2561
11.1k
        auto modifier = parentDs->GetData(0);
2562
11.1k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
11.1k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
11.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
8.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
8.07k
    Datasource ds(data, size);
2560
8.07k
    if ( parentDs != nullptr ) {
2561
8.07k
        auto modifier = parentDs->GetData(0);
2562
8.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
8.07k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
8.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
10.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
10.7k
    Datasource ds(data, size);
2560
10.7k
    if ( parentDs != nullptr ) {
2561
10.7k
        auto modifier = parentDs->GetData(0);
2562
10.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
10.7k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
10.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
9.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
9.48k
    Datasource ds(data, size);
2560
9.48k
    if ( parentDs != nullptr ) {
2561
9.48k
        auto modifier = parentDs->GetData(0);
2562
9.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
9.48k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
9.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
32.5k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
32.5k
    Datasource ds(data, size);
2560
32.5k
    if ( parentDs != nullptr ) {
2561
32.5k
        auto modifier = parentDs->GetData(0);
2562
32.5k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
32.5k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
32.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
23.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
23.6k
    Datasource ds(data, size);
2560
23.6k
    if ( parentDs != nullptr ) {
2561
23.6k
        auto modifier = parentDs->GetData(0);
2562
23.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
23.6k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
23.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.79k
    Datasource ds(data, size);
2560
5.79k
    if ( parentDs != nullptr ) {
2561
5.79k
        auto modifier = parentDs->GetData(0);
2562
5.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.79k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
13.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
13.0k
    Datasource ds(data, size);
2560
13.0k
    if ( parentDs != nullptr ) {
2561
13.0k
        auto modifier = parentDs->GetData(0);
2562
13.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
13.0k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
13.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.67k
    Datasource ds(data, size);
2560
5.67k
    if ( parentDs != nullptr ) {
2561
5.67k
        auto modifier = parentDs->GetData(0);
2562
5.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.67k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.87k
    Datasource ds(data, size);
2560
4.87k
    if ( parentDs != nullptr ) {
2561
4.87k
        auto modifier = parentDs->GetData(0);
2562
4.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.87k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.77k
    Datasource ds(data, size);
2560
4.77k
    if ( parentDs != nullptr ) {
2561
4.77k
        auto modifier = parentDs->GetData(0);
2562
4.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.77k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
7.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
7.47k
    Datasource ds(data, size);
2560
7.47k
    if ( parentDs != nullptr ) {
2561
7.47k
        auto modifier = parentDs->GetData(0);
2562
7.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
7.47k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
7.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.02k
    Datasource ds(data, size);
2560
5.02k
    if ( parentDs != nullptr ) {
2561
5.02k
        auto modifier = parentDs->GetData(0);
2562
5.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.02k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.85k
    Datasource ds(data, size);
2560
4.85k
    if ( parentDs != nullptr ) {
2561
4.85k
        auto modifier = parentDs->GetData(0);
2562
4.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.85k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.02k
    Datasource ds(data, size);
2560
5.02k
    if ( parentDs != nullptr ) {
2561
5.02k
        auto modifier = parentDs->GetData(0);
2562
5.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.02k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.19k
    Datasource ds(data, size);
2560
4.19k
    if ( parentDs != nullptr ) {
2561
4.19k
        auto modifier = parentDs->GetData(0);
2562
4.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.19k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
7.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
7.14k
    Datasource ds(data, size);
2560
7.14k
    if ( parentDs != nullptr ) {
2561
7.14k
        auto modifier = parentDs->GetData(0);
2562
7.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
7.14k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
7.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.55k
    Datasource ds(data, size);
2560
5.55k
    if ( parentDs != nullptr ) {
2561
5.55k
        auto modifier = parentDs->GetData(0);
2562
5.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.26k
    Datasource ds(data, size);
2560
4.26k
    if ( parentDs != nullptr ) {
2561
4.26k
        auto modifier = parentDs->GetData(0);
2562
4.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.26k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.62k
    Datasource ds(data, size);
2560
5.62k
    if ( parentDs != nullptr ) {
2561
5.62k
        auto modifier = parentDs->GetData(0);
2562
5.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.62k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.80k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.80k
    Datasource ds(data, size);
2560
4.80k
    if ( parentDs != nullptr ) {
2561
4.80k
        auto modifier = parentDs->GetData(0);
2562
4.80k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.80k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
7.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
7.17k
    Datasource ds(data, size);
2560
7.17k
    if ( parentDs != nullptr ) {
2561
7.17k
        auto modifier = parentDs->GetData(0);
2562
7.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
7.17k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
7.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.38k
    Datasource ds(data, size);
2560
5.38k
    if ( parentDs != nullptr ) {
2561
5.38k
        auto modifier = parentDs->GetData(0);
2562
5.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.38k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.94k
    Datasource ds(data, size);
2560
4.94k
    if ( parentDs != nullptr ) {
2561
4.94k
        auto modifier = parentDs->GetData(0);
2562
4.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.94k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.49k
    Datasource ds(data, size);
2560
5.49k
    if ( parentDs != nullptr ) {
2561
5.49k
        auto modifier = parentDs->GetData(0);
2562
5.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.49k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.51k
    Datasource ds(data, size);
2560
5.51k
    if ( parentDs != nullptr ) {
2561
5.51k
        auto modifier = parentDs->GetData(0);
2562
5.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.51k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.67k
    Datasource ds(data, size);
2560
4.67k
    if ( parentDs != nullptr ) {
2561
4.67k
        auto modifier = parentDs->GetData(0);
2562
4.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.67k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.61k
    Datasource ds(data, size);
2560
4.61k
    if ( parentDs != nullptr ) {
2561
4.61k
        auto modifier = parentDs->GetData(0);
2562
4.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.61k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.61k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.83k
    Datasource ds(data, size);
2560
3.83k
    if ( parentDs != nullptr ) {
2561
3.83k
        auto modifier = parentDs->GetData(0);
2562
3.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.83k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.83k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.77k
    Datasource ds(data, size);
2560
4.77k
    if ( parentDs != nullptr ) {
2561
4.77k
        auto modifier = parentDs->GetData(0);
2562
4.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.77k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
6.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
6.01k
    Datasource ds(data, size);
2560
6.01k
    if ( parentDs != nullptr ) {
2561
6.01k
        auto modifier = parentDs->GetData(0);
2562
6.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
6.01k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
6.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.54k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.54k
    Datasource ds(data, size);
2560
4.54k
    if ( parentDs != nullptr ) {
2561
4.54k
        auto modifier = parentDs->GetData(0);
2562
4.54k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.54k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.72k
    Datasource ds(data, size);
2560
4.72k
    if ( parentDs != nullptr ) {
2561
4.72k
        auto modifier = parentDs->GetData(0);
2562
4.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.72k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.30k
    Datasource ds(data, size);
2560
3.30k
    if ( parentDs != nullptr ) {
2561
3.30k
        auto modifier = parentDs->GetData(0);
2562
3.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.30k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.92k
    Datasource ds(data, size);
2560
4.92k
    if ( parentDs != nullptr ) {
2561
4.92k
        auto modifier = parentDs->GetData(0);
2562
4.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.92k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.07k
    Datasource ds(data, size);
2560
5.07k
    if ( parentDs != nullptr ) {
2561
5.07k
        auto modifier = parentDs->GetData(0);
2562
5.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.07k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.10k
    Datasource ds(data, size);
2560
4.10k
    if ( parentDs != nullptr ) {
2561
4.10k
        auto modifier = parentDs->GetData(0);
2562
4.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.10k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.27k
    Datasource ds(data, size);
2560
5.27k
    if ( parentDs != nullptr ) {
2561
5.27k
        auto modifier = parentDs->GetData(0);
2562
5.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.27k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.28k
    Datasource ds(data, size);
2560
5.28k
    if ( parentDs != nullptr ) {
2561
5.28k
        auto modifier = parentDs->GetData(0);
2562
5.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.28k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.00k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.00k
    Datasource ds(data, size);
2560
4.00k
    if ( parentDs != nullptr ) {
2561
4.00k
        auto modifier = parentDs->GetData(0);
2562
4.00k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.00k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
6.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
6.75k
    Datasource ds(data, size);
2560
6.75k
    if ( parentDs != nullptr ) {
2561
6.75k
        auto modifier = parentDs->GetData(0);
2562
6.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
6.75k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
6.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.79k
    Datasource ds(data, size);
2560
3.79k
    if ( parentDs != nullptr ) {
2561
3.79k
        auto modifier = parentDs->GetData(0);
2562
3.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.79k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.29k
    Datasource ds(data, size);
2560
3.29k
    if ( parentDs != nullptr ) {
2561
3.29k
        auto modifier = parentDs->GetData(0);
2562
3.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.29k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.55k
    Datasource ds(data, size);
2560
5.55k
    if ( parentDs != nullptr ) {
2561
5.55k
        auto modifier = parentDs->GetData(0);
2562
5.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.79k
    Datasource ds(data, size);
2560
4.79k
    if ( parentDs != nullptr ) {
2561
4.79k
        auto modifier = parentDs->GetData(0);
2562
4.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.79k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.55k
    Datasource ds(data, size);
2560
5.55k
    if ( parentDs != nullptr ) {
2561
5.55k
        auto modifier = parentDs->GetData(0);
2562
5.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
32.1k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
32.1k
    Datasource ds(data, size);
2560
32.1k
    if ( parentDs != nullptr ) {
2561
32.1k
        auto modifier = parentDs->GetData(0);
2562
32.1k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
32.1k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
32.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.17k
    Datasource ds(data, size);
2560
4.17k
    if ( parentDs != nullptr ) {
2561
4.17k
        auto modifier = parentDs->GetData(0);
2562
4.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.17k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
6.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
6.01k
    Datasource ds(data, size);
2560
6.01k
    if ( parentDs != nullptr ) {
2561
6.01k
        auto modifier = parentDs->GetData(0);
2562
6.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
6.01k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
6.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.28k
    Datasource ds(data, size);
2560
3.28k
    if ( parentDs != nullptr ) {
2561
3.28k
        auto modifier = parentDs->GetData(0);
2562
3.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.28k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.23k
    Datasource ds(data, size);
2560
3.23k
    if ( parentDs != nullptr ) {
2561
3.23k
        auto modifier = parentDs->GetData(0);
2562
3.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.23k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.38k
    Datasource ds(data, size);
2560
4.38k
    if ( parentDs != nullptr ) {
2561
4.38k
        auto modifier = parentDs->GetData(0);
2562
4.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.38k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.67k
    Datasource ds(data, size);
2560
4.67k
    if ( parentDs != nullptr ) {
2561
4.67k
        auto modifier = parentDs->GetData(0);
2562
4.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.67k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.36k
    Datasource ds(data, size);
2560
4.36k
    if ( parentDs != nullptr ) {
2561
4.36k
        auto modifier = parentDs->GetData(0);
2562
4.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.36k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.61k
    Datasource ds(data, size);
2560
3.61k
    if ( parentDs != nullptr ) {
2561
3.61k
        auto modifier = parentDs->GetData(0);
2562
3.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.61k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.65k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.65k
    Datasource ds(data, size);
2560
3.65k
    if ( parentDs != nullptr ) {
2561
3.65k
        auto modifier = parentDs->GetData(0);
2562
3.65k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.65k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.01k
    Datasource ds(data, size);
2560
4.01k
    if ( parentDs != nullptr ) {
2561
4.01k
        auto modifier = parentDs->GetData(0);
2562
4.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.01k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.92k
    Datasource ds(data, size);
2560
4.92k
    if ( parentDs != nullptr ) {
2561
4.92k
        auto modifier = parentDs->GetData(0);
2562
4.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.92k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.03k
    Datasource ds(data, size);
2560
4.03k
    if ( parentDs != nullptr ) {
2561
4.03k
        auto modifier = parentDs->GetData(0);
2562
4.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.03k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.26k
    Datasource ds(data, size);
2560
4.26k
    if ( parentDs != nullptr ) {
2561
4.26k
        auto modifier = parentDs->GetData(0);
2562
4.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.26k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.44k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.44k
    Datasource ds(data, size);
2560
4.44k
    if ( parentDs != nullptr ) {
2561
4.44k
        auto modifier = parentDs->GetData(0);
2562
4.44k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.44k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.97k
    Datasource ds(data, size);
2560
4.97k
    if ( parentDs != nullptr ) {
2561
4.97k
        auto modifier = parentDs->GetData(0);
2562
4.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.97k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.51k
    Datasource ds(data, size);
2560
4.51k
    if ( parentDs != nullptr ) {
2561
4.51k
        auto modifier = parentDs->GetData(0);
2562
4.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.51k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.07k
    Datasource ds(data, size);
2560
4.07k
    if ( parentDs != nullptr ) {
2561
4.07k
        auto modifier = parentDs->GetData(0);
2562
4.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.07k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.07k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.47k
    Datasource ds(data, size);
2560
3.47k
    if ( parentDs != nullptr ) {
2561
3.47k
        auto modifier = parentDs->GetData(0);
2562
3.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.47k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.47k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.29k
    Datasource ds(data, size);
2560
4.29k
    if ( parentDs != nullptr ) {
2561
4.29k
        auto modifier = parentDs->GetData(0);
2562
4.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.29k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.96k
    Datasource ds(data, size);
2560
4.96k
    if ( parentDs != nullptr ) {
2561
4.96k
        auto modifier = parentDs->GetData(0);
2562
4.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.96k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.90k
    Datasource ds(data, size);
2560
3.90k
    if ( parentDs != nullptr ) {
2561
3.90k
        auto modifier = parentDs->GetData(0);
2562
3.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.90k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.84k
    Datasource ds(data, size);
2560
3.84k
    if ( parentDs != nullptr ) {
2561
3.84k
        auto modifier = parentDs->GetData(0);
2562
3.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.84k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.44k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.44k
    Datasource ds(data, size);
2560
3.44k
    if ( parentDs != nullptr ) {
2561
3.44k
        auto modifier = parentDs->GetData(0);
2562
3.44k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.44k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.90k
    Datasource ds(data, size);
2560
3.90k
    if ( parentDs != nullptr ) {
2561
3.90k
        auto modifier = parentDs->GetData(0);
2562
3.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.90k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.87k
    Datasource ds(data, size);
2560
3.87k
    if ( parentDs != nullptr ) {
2561
3.87k
        auto modifier = parentDs->GetData(0);
2562
3.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.87k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.72k
    Datasource ds(data, size);
2560
3.72k
    if ( parentDs != nullptr ) {
2561
3.72k
        auto modifier = parentDs->GetData(0);
2562
3.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.72k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.72k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.04k
    Datasource ds(data, size);
2560
5.04k
    if ( parentDs != nullptr ) {
2561
5.04k
        auto modifier = parentDs->GetData(0);
2562
5.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.04k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.61k
    Datasource ds(data, size);
2560
3.61k
    if ( parentDs != nullptr ) {
2561
3.61k
        auto modifier = parentDs->GetData(0);
2562
3.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.61k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.34k
    Datasource ds(data, size);
2560
4.34k
    if ( parentDs != nullptr ) {
2561
4.34k
        auto modifier = parentDs->GetData(0);
2562
4.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.34k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
5.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
5.30k
    Datasource ds(data, size);
2560
5.30k
    if ( parentDs != nullptr ) {
2561
5.30k
        auto modifier = parentDs->GetData(0);
2562
5.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
5.30k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
5.30k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.46k
    Datasource ds(data, size);
2560
4.46k
    if ( parentDs != nullptr ) {
2561
4.46k
        auto modifier = parentDs->GetData(0);
2562
4.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.46k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.55k
    Datasource ds(data, size);
2560
4.55k
    if ( parentDs != nullptr ) {
2561
4.55k
        auto modifier = parentDs->GetData(0);
2562
4.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.55k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
3.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
3.15k
    Datasource ds(data, size);
2560
3.15k
    if ( parentDs != nullptr ) {
2561
3.15k
        auto modifier = parentDs->GetData(0);
2562
3.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
3.15k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
3.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2558
4.43k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2559
4.43k
    Datasource ds(data, size);
2560
4.43k
    if ( parentDs != nullptr ) {
2561
4.43k
        auto modifier = parentDs->GetData(0);
2562
4.43k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2563
4.43k
    } else {
2564
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2565
0
    }
2566
4.43k
}
2567
2568
template <class ResultType, class OperationType>
2569
478k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
478k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
478k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
478k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
478k
    if ( modules.find(moduleID) == modules.end() ) {
2583
343k
        return nullptr;
2584
343k
    }
2585
2586
134k
    return modules.at(moduleID);
2587
478k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
11.1k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
11.1k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
11.1k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
11.1k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
11.1k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.88k
        return nullptr;
2584
3.88k
    }
2585
2586
7.21k
    return modules.at(moduleID);
2587
11.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
8.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
8.03k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
8.03k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
8.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
8.03k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.95k
        return nullptr;
2584
3.95k
    }
2585
2586
4.07k
    return modules.at(moduleID);
2587
8.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
10.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
10.6k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
10.6k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
10.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
10.6k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.16k
        return nullptr;
2584
5.16k
    }
2585
2586
5.48k
    return modules.at(moduleID);
2587
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
9.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
9.44k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
9.44k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
9.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
9.44k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.64k
        return nullptr;
2584
4.64k
    }
2585
2586
4.80k
    return modules.at(moduleID);
2587
9.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
32.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
32.4k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
32.4k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
32.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
32.4k
    if ( modules.find(moduleID) == modules.end() ) {
2583
10.3k
        return nullptr;
2584
10.3k
    }
2585
2586
22.0k
    return modules.at(moduleID);
2587
32.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
23.5k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
23.5k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
23.5k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
23.5k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
23.5k
    if ( modules.find(moduleID) == modules.end() ) {
2583
7.17k
        return nullptr;
2584
7.17k
    }
2585
2586
16.3k
    return modules.at(moduleID);
2587
23.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.72k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.72k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.72k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.07k
        return nullptr;
2584
4.07k
    }
2585
2586
1.64k
    return modules.at(moduleID);
2587
5.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
13.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
13.0k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
13.0k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
13.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
13.0k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.07k
        return nullptr;
2584
5.07k
    }
2585
2586
7.93k
    return modules.at(moduleID);
2587
13.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.62k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.62k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.62k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.41k
        return nullptr;
2584
4.41k
    }
2585
2586
1.21k
    return modules.at(moduleID);
2587
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.83k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.83k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.83k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.83k
        return nullptr;
2584
3.83k
    }
2585
2586
1.00k
    return modules.at(moduleID);
2587
4.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.73k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.73k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.73k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.65k
        return nullptr;
2584
3.65k
    }
2585
2586
1.08k
    return modules.at(moduleID);
2587
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
7.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
7.43k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
7.43k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
7.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
7.43k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.58k
        return nullptr;
2584
4.58k
    }
2585
2586
2.84k
    return modules.at(moduleID);
2587
7.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.97k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.97k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.97k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.12k
        return nullptr;
2584
4.12k
    }
2585
2586
850
    return modules.at(moduleID);
2587
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.78k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.78k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.78k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.63k
        return nullptr;
2584
3.63k
    }
2585
2586
1.15k
    return modules.at(moduleID);
2587
4.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.97k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.97k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.97k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.92k
        return nullptr;
2584
3.92k
    }
2585
2586
1.04k
    return modules.at(moduleID);
2587
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.14k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.14k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.14k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.91k
        return nullptr;
2584
3.91k
    }
2585
2586
233
    return modules.at(moduleID);
2587
4.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
7.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
7.09k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
7.09k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
7.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
7.09k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.29k
        return nullptr;
2584
4.29k
    }
2585
2586
2.79k
    return modules.at(moduleID);
2587
7.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.51k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.51k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.51k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.92k
        return nullptr;
2584
2.92k
    }
2585
2586
2.58k
    return modules.at(moduleID);
2587
5.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.23k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.23k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.23k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.09k
        return nullptr;
2584
3.09k
    }
2585
2586
1.13k
    return modules.at(moduleID);
2587
4.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.59k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.59k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.59k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.59k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.59k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.90k
        return nullptr;
2584
3.90k
    }
2585
2586
1.68k
    return modules.at(moduleID);
2587
5.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.76k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.76k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.76k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.76k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.76k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.37k
        return nullptr;
2584
4.37k
    }
2585
2586
396
    return modules.at(moduleID);
2587
4.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
7.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
7.12k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
7.12k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
7.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
7.12k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.79k
        return nullptr;
2584
4.79k
    }
2585
2586
2.33k
    return modules.at(moduleID);
2587
7.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.34k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.34k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.34k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.55k
        return nullptr;
2584
4.55k
    }
2585
2586
789
    return modules.at(moduleID);
2587
5.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.90k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.90k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.90k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.90k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.90k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.54k
        return nullptr;
2584
4.54k
    }
2585
2586
356
    return modules.at(moduleID);
2587
4.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.44k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.44k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.44k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.11k
        return nullptr;
2584
5.11k
    }
2585
2586
334
    return modules.at(moduleID);
2587
5.44k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.46k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.46k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.46k
    if ( modules.find(moduleID) == modules.end() ) {
2583
5.15k
        return nullptr;
2584
5.15k
    }
2585
2586
307
    return modules.at(moduleID);
2587
5.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.62k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.62k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.62k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.41k
        return nullptr;
2584
3.41k
    }
2585
2586
1.21k
    return modules.at(moduleID);
2587
4.62k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.57k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.57k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.57k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.95k
        return nullptr;
2584
3.95k
    }
2585
2586
623
    return modules.at(moduleID);
2587
4.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.78k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.78k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.78k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.52k
        return nullptr;
2584
3.52k
    }
2585
2586
268
    return modules.at(moduleID);
2587
3.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.73k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.73k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.73k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.43k
        return nullptr;
2584
4.43k
    }
2585
2586
300
    return modules.at(moduleID);
2587
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.96k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.96k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.96k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.96k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.96k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.23k
        return nullptr;
2584
4.23k
    }
2585
2586
1.72k
    return modules.at(moduleID);
2587
5.96k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.48k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.48k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.48k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.13k
        return nullptr;
2584
4.13k
    }
2585
2586
356
    return modules.at(moduleID);
2587
4.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.67k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.67k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.67k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.31k
        return nullptr;
2584
4.31k
    }
2585
2586
361
    return modules.at(moduleID);
2587
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.27k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.27k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.27k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.96k
        return nullptr;
2584
2.96k
    }
2585
2586
312
    return modules.at(moduleID);
2587
3.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.86k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.86k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.86k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.55k
        return nullptr;
2584
4.55k
    }
2585
2586
316
    return modules.at(moduleID);
2587
4.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.01k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.01k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.01k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.65k
        return nullptr;
2584
4.65k
    }
2585
2586
369
    return modules.at(moduleID);
2587
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.04k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.04k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.04k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.71k
        return nullptr;
2584
3.71k
    }
2585
2586
333
    return modules.at(moduleID);
2587
4.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.22k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.22k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.22k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.91k
        return nullptr;
2584
4.91k
    }
2585
2586
311
    return modules.at(moduleID);
2587
5.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.24k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.24k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.24k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.88k
        return nullptr;
2584
4.88k
    }
2585
2586
357
    return modules.at(moduleID);
2587
5.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.96k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.96k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.96k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.96k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.96k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.47k
        return nullptr;
2584
3.47k
    }
2585
2586
489
    return modules.at(moduleID);
2587
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
6.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
6.69k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
6.69k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
6.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
6.69k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.76k
        return nullptr;
2584
4.76k
    }
2585
2586
1.93k
    return modules.at(moduleID);
2587
6.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.74k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.74k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.74k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.28k
        return nullptr;
2584
3.28k
    }
2585
2586
460
    return modules.at(moduleID);
2587
3.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.25k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.25k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.25k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.84k
        return nullptr;
2584
2.84k
    }
2585
2586
412
    return modules.at(moduleID);
2587
3.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.49k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.49k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.49k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.97k
        return nullptr;
2584
4.97k
    }
2585
2586
525
    return modules.at(moduleID);
2587
5.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.75k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.75k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.75k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.41k
        return nullptr;
2584
4.41k
    }
2585
2586
339
    return modules.at(moduleID);
2587
4.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.51k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.51k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.51k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.58k
        return nullptr;
2584
4.58k
    }
2585
2586
927
    return modules.at(moduleID);
2587
5.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
32.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
32.0k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
32.0k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
32.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
32.0k
    if ( modules.find(moduleID) == modules.end() ) {
2583
13.9k
        return nullptr;
2584
13.9k
    }
2585
2586
18.0k
    return modules.at(moduleID);
2587
32.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.12k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.12k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.12k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.72k
        return nullptr;
2584
3.72k
    }
2585
2586
401
    return modules.at(moduleID);
2587
4.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.92k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.92k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.92k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.89k
        return nullptr;
2584
4.89k
    }
2585
2586
1.02k
    return modules.at(moduleID);
2587
5.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.23k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.23k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.23k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.89k
        return nullptr;
2584
2.89k
    }
2585
2586
336
    return modules.at(moduleID);
2587
3.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.20k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.20k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.20k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.87k
        return nullptr;
2584
2.87k
    }
2585
2586
338
    return modules.at(moduleID);
2587
3.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.34k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.34k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.34k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.04k
        return nullptr;
2584
4.04k
    }
2585
2586
297
    return modules.at(moduleID);
2587
4.34k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.61k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.61k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.61k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.27k
        return nullptr;
2584
4.27k
    }
2585
2586
339
    return modules.at(moduleID);
2587
4.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.23k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.23k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.23k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.84k
        return nullptr;
2584
3.84k
    }
2585
2586
386
    return modules.at(moduleID);
2587
4.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.49k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.49k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.49k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.10k
        return nullptr;
2584
3.10k
    }
2585
2586
387
    return modules.at(moduleID);
2587
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.52k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.52k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.52k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.16k
        return nullptr;
2584
3.16k
    }
2585
2586
361
    return modules.at(moduleID);
2587
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.89k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.89k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.89k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.57k
        return nullptr;
2584
3.57k
    }
2585
2586
323
    return modules.at(moduleID);
2587
3.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.88k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.88k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.88k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.57k
        return nullptr;
2584
4.57k
    }
2585
2586
302
    return modules.at(moduleID);
2587
4.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.98k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.98k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.98k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.65k
        return nullptr;
2584
3.65k
    }
2585
2586
330
    return modules.at(moduleID);
2587
3.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.21k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.21k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.21k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.84k
        return nullptr;
2584
3.84k
    }
2585
2586
369
    return modules.at(moduleID);
2587
4.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.39k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.39k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.39k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.07k
        return nullptr;
2584
4.07k
    }
2585
2586
321
    return modules.at(moduleID);
2587
4.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.91k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.91k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.91k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.57k
        return nullptr;
2584
4.57k
    }
2585
2586
332
    return modules.at(moduleID);
2587
4.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.46k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.46k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.46k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.11k
        return nullptr;
2584
4.11k
    }
2585
2586
354
    return modules.at(moduleID);
2587
4.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.04k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.04k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.04k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.70k
        return nullptr;
2584
3.70k
    }
2585
2586
334
    return modules.at(moduleID);
2587
4.04k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.43k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.43k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.43k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.11k
        return nullptr;
2584
3.11k
    }
2585
2586
326
    return modules.at(moduleID);
2587
3.43k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.26k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.26k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.26k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.87k
        return nullptr;
2584
3.87k
    }
2585
2586
391
    return modules.at(moduleID);
2587
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.92k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.92k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.92k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.58k
        return nullptr;
2584
4.58k
    }
2585
2586
343
    return modules.at(moduleID);
2587
4.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.86k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.86k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.86k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.58k
        return nullptr;
2584
3.58k
    }
2585
2586
283
    return modules.at(moduleID);
2587
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.79k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.79k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.79k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.48k
        return nullptr;
2584
3.48k
    }
2585
2586
311
    return modules.at(moduleID);
2587
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.40k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.40k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.40k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.10k
        return nullptr;
2584
3.10k
    }
2585
2586
305
    return modules.at(moduleID);
2587
3.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.86k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.86k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.86k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.53k
        return nullptr;
2584
3.53k
    }
2585
2586
330
    return modules.at(moduleID);
2587
3.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.84k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.84k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.84k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.46k
        return nullptr;
2584
3.46k
    }
2585
2586
380
    return modules.at(moduleID);
2587
3.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.68k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.68k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.68k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.36k
        return nullptr;
2584
3.36k
    }
2585
2586
322
    return modules.at(moduleID);
2587
3.68k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.98k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.98k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.98k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.58k
        return nullptr;
2584
4.58k
    }
2585
2586
405
    return modules.at(moduleID);
2587
4.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.57k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.57k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.57k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.24k
        return nullptr;
2584
3.24k
    }
2585
2586
324
    return modules.at(moduleID);
2587
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.30k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.30k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.30k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.83k
        return nullptr;
2584
3.83k
    }
2585
2586
466
    return modules.at(moduleID);
2587
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
5.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
5.23k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
5.23k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
5.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
5.23k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.85k
        return nullptr;
2584
4.85k
    }
2585
2586
384
    return modules.at(moduleID);
2587
5.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.42k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.42k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.42k
    if ( modules.find(moduleID) == modules.end() ) {
2583
3.99k
        return nullptr;
2584
3.99k
    }
2585
2586
435
    return modules.at(moduleID);
2587
4.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.49k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.49k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.49k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.07k
        return nullptr;
2584
4.07k
    }
2585
2586
419
    return modules.at(moduleID);
2587
4.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
3.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
3.11k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
3.11k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
3.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
3.11k
    if ( modules.find(moduleID) == modules.end() ) {
2583
2.84k
        return nullptr;
2584
2.84k
    }
2585
2586
276
    return modules.at(moduleID);
2587
3.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2569
4.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2570
4.39k
    auto moduleID = ds.Get<uint64_t>();
2571
2572
    /* Override the extracted module ID with the preferred one, if specified */
2573
4.39k
    if ( options.forceModule != std::nullopt ) {
2574
0
        moduleID = *options.forceModule;
2575
0
    }
2576
2577
    /* Skip if this is a disabled module */
2578
4.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2579
0
        return nullptr;
2580
0
    }
2581
2582
4.39k
    if ( modules.find(moduleID) == modules.end() ) {
2583
4.04k
        return nullptr;
2584
4.04k
    }
2585
2586
355
    return modules.at(moduleID);
2587
4.39k
}
2588
2589
template <class ResultType, class OperationType>
2590
67.0k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
67.0k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
67.0k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
482k
    do {
2596
482k
        auto op = getOp(&parentDs, data, size);
2597
482k
        auto module = getModule(parentDs);
2598
482k
        if ( module == nullptr ) {
2599
343k
            continue;
2600
343k
        }
2601
2602
138k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
138k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
1.65k
            break;
2607
1.65k
        }
2608
480k
    } while ( parentDs.Get<bool>() == true );
2609
2610
67.0k
    if ( operations.empty() == true ) {
2611
2.50k
        return;
2612
2.50k
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
64.5k
#if 1
2616
64.5k
    {
2617
64.5k
        std::set<uint64_t> moduleIDs;
2618
103k
        for (const auto& m : modules ) {
2619
103k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
103k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
103k
            moduleIDs.insert(moduleID);
2627
103k
        }
2628
2629
64.5k
        std::set<uint64_t> operationModuleIDs;
2630
121k
        for (const auto& op : operations) {
2631
121k
            operationModuleIDs.insert(op.first->ID);
2632
121k
        }
2633
2634
64.5k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
64.5k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
64.5k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
64.5k
        for (const auto& id : addModuleIDs) {
2639
49.3k
            operations.push_back({ modules.at(id), operations[0].second});
2640
49.3k
        }
2641
64.5k
    }
2642
64.5k
#endif
2643
2644
64.5k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
64.5k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
235k
    for (size_t i = 0; i < operations.size(); i++) {
2652
171k
        auto& operation = operations[i];
2653
2654
171k
        auto& module = operation.first;
2655
171k
        auto& op = operation.second;
2656
2657
171k
        if ( i > 0 ) {
2658
119k
            auto& prevModule = operations[i-1].first;
2659
119k
            auto& prevOp = operations[i].second;
2660
2661
119k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
65.2k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
65.2k
                if ( curModifier.size() == 0 ) {
2664
22.5M
                    for (size_t j = 0; j < 512; j++) {
2665
22.5M
                        curModifier.push_back(1);
2666
22.5M
                    }
2667
43.9k
                } else {
2668
405k
                    for (auto& c : curModifier) {
2669
405k
                        c++;
2670
405k
                    }
2671
21.2k
                }
2672
65.2k
            }
2673
119k
        }
2674
2675
171k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
171k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
171k
        const auto& result = results.back();
2682
2683
171k
        if ( result.second != std::nullopt ) {
2684
47.3k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
47.3k
        }
2691
2692
171k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
171k
        if ( options.disableTests == false ) {
2701
171k
            tests::test(op, result.second);
2702
171k
        }
2703
2704
171k
        postprocess(module, op, result);
2705
171k
    }
2706
2707
64.5k
    if ( options.noCompare == false ) {
2708
51.7k
        compare(operations, results, data, size);
2709
51.7k
    }
2710
64.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
4.12k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
4.12k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
4.12k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
11.1k
    do {
2596
11.1k
        auto op = getOp(&parentDs, data, size);
2597
11.1k
        auto module = getModule(parentDs);
2598
11.1k
        if ( module == nullptr ) {
2599
3.88k
            continue;
2600
3.88k
        }
2601
2602
7.26k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
7.26k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
11.1k
    } while ( parentDs.Get<bool>() == true );
2609
2610
4.12k
    if ( operations.empty() == true ) {
2611
54
        return;
2612
54
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
4.07k
#if 1
2616
4.07k
    {
2617
4.07k
        std::set<uint64_t> moduleIDs;
2618
7.66k
        for (const auto& m : modules ) {
2619
7.66k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
7.66k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
7.66k
            moduleIDs.insert(moduleID);
2627
7.66k
        }
2628
2629
4.07k
        std::set<uint64_t> operationModuleIDs;
2630
6.98k
        for (const auto& op : operations) {
2631
6.98k
            operationModuleIDs.insert(op.first->ID);
2632
6.98k
        }
2633
2634
4.07k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
4.07k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
4.07k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
4.07k
        for (const auto& id : addModuleIDs) {
2639
3.77k
            operations.push_back({ modules.at(id), operations[0].second});
2640
3.77k
        }
2641
4.07k
    }
2642
4.07k
#endif
2643
2644
4.07k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
4.07k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
14.8k
    for (size_t i = 0; i < operations.size(); i++) {
2652
10.7k
        auto& operation = operations[i];
2653
2654
10.7k
        auto& module = operation.first;
2655
10.7k
        auto& op = operation.second;
2656
2657
10.7k
        if ( i > 0 ) {
2658
6.92k
            auto& prevModule = operations[i-1].first;
2659
6.92k
            auto& prevOp = operations[i].second;
2660
2661
6.92k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
3.01k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
3.01k
                if ( curModifier.size() == 0 ) {
2664
1.15M
                    for (size_t j = 0; j < 512; j++) {
2665
1.14M
                        curModifier.push_back(1);
2666
1.14M
                    }
2667
2.24k
                } else {
2668
8.09k
                    for (auto& c : curModifier) {
2669
8.09k
                        c++;
2670
8.09k
                    }
2671
773
                }
2672
3.01k
            }
2673
6.92k
        }
2674
2675
10.7k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
10.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
10.7k
        const auto& result = results.back();
2682
2683
10.7k
        if ( result.second != std::nullopt ) {
2684
4.54k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
4.54k
        }
2691
2692
10.7k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
10.7k
        if ( options.disableTests == false ) {
2701
10.7k
            tests::test(op, result.second);
2702
10.7k
        }
2703
2704
10.7k
        postprocess(module, op, result);
2705
10.7k
    }
2706
2707
4.07k
    if ( options.noCompare == false ) {
2708
3.83k
        compare(operations, results, data, size);
2709
3.83k
    }
2710
4.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.65k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.65k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.65k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
8.07k
    do {
2596
8.07k
        auto op = getOp(&parentDs, data, size);
2597
8.07k
        auto module = getModule(parentDs);
2598
8.07k
        if ( module == nullptr ) {
2599
3.95k
            continue;
2600
3.95k
        }
2601
2602
4.12k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
4.12k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
8
            break;
2607
8
        }
2608
8.06k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.65k
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.63k
#if 1
2616
1.63k
    {
2617
1.63k
        std::set<uint64_t> moduleIDs;
2618
3.04k
        for (const auto& m : modules ) {
2619
3.04k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
3.04k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
3.04k
            moduleIDs.insert(moduleID);
2627
3.04k
        }
2628
2629
1.63k
        std::set<uint64_t> operationModuleIDs;
2630
3.88k
        for (const auto& op : operations) {
2631
3.88k
            operationModuleIDs.insert(op.first->ID);
2632
3.88k
        }
2633
2634
1.63k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.63k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.63k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.63k
        for (const auto& id : addModuleIDs) {
2639
1.46k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.46k
        }
2641
1.63k
    }
2642
1.63k
#endif
2643
2644
1.63k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.63k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
6.98k
    for (size_t i = 0; i < operations.size(); i++) {
2652
5.34k
        auto& operation = operations[i];
2653
2654
5.34k
        auto& module = operation.first;
2655
5.34k
        auto& op = operation.second;
2656
2657
5.34k
        if ( i > 0 ) {
2658
3.82k
            auto& prevModule = operations[i-1].first;
2659
3.82k
            auto& prevOp = operations[i].second;
2660
2661
3.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.21k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.21k
                if ( curModifier.size() == 0 ) {
2664
839k
                    for (size_t j = 0; j < 512; j++) {
2665
837k
                        curModifier.push_back(1);
2666
837k
                    }
2667
1.63k
                } else {
2668
2.63k
                    for (auto& c : curModifier) {
2669
2.63k
                        c++;
2670
2.63k
                    }
2671
583
                }
2672
2.21k
            }
2673
3.82k
        }
2674
2675
5.34k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
5.34k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
5.34k
        const auto& result = results.back();
2682
2683
5.34k
        if ( result.second != std::nullopt ) {
2684
2.32k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
2.32k
        }
2691
2692
5.34k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
5.34k
        if ( options.disableTests == false ) {
2701
5.34k
            tests::test(op, result.second);
2702
5.34k
        }
2703
2704
5.34k
        postprocess(module, op, result);
2705
5.34k
    }
2706
2707
1.63k
    if ( options.noCompare == false ) {
2708
1.52k
        compare(operations, results, data, size);
2709
1.52k
    }
2710
1.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.21k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.21k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.21k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
10.7k
    do {
2596
10.7k
        auto op = getOp(&parentDs, data, size);
2597
10.7k
        auto module = getModule(parentDs);
2598
10.7k
        if ( module == nullptr ) {
2599
5.16k
            continue;
2600
5.16k
        }
2601
2602
5.54k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
5.54k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
10.6k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.21k
    if ( operations.empty() == true ) {
2611
36
        return;
2612
36
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.17k
#if 1
2616
1.17k
    {
2617
1.17k
        std::set<uint64_t> moduleIDs;
2618
2.05k
        for (const auto& m : modules ) {
2619
2.05k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.05k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.05k
            moduleIDs.insert(moduleID);
2627
2.05k
        }
2628
2629
1.17k
        std::set<uint64_t> operationModuleIDs;
2630
5.09k
        for (const auto& op : operations) {
2631
5.09k
            operationModuleIDs.insert(op.first->ID);
2632
5.09k
        }
2633
2634
1.17k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.17k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.17k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.17k
        for (const auto& id : addModuleIDs) {
2639
967
            operations.push_back({ modules.at(id), operations[0].second});
2640
967
        }
2641
1.17k
    }
2642
1.17k
#endif
2643
2644
1.17k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.17k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
7.23k
    for (size_t i = 0; i < operations.size(); i++) {
2652
6.06k
        auto& operation = operations[i];
2653
2654
6.06k
        auto& module = operation.first;
2655
6.06k
        auto& op = operation.second;
2656
2657
6.06k
        if ( i > 0 ) {
2658
5.03k
            auto& prevModule = operations[i-1].first;
2659
5.03k
            auto& prevOp = operations[i].second;
2660
2661
5.03k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
3.93k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
3.93k
                if ( curModifier.size() == 0 ) {
2664
1.69M
                    for (size_t j = 0; j < 512; j++) {
2665
1.68M
                        curModifier.push_back(1);
2666
1.68M
                    }
2667
3.29k
                } else {
2668
2.82k
                    for (auto& c : curModifier) {
2669
2.82k
                        c++;
2670
2.82k
                    }
2671
635
                }
2672
3.93k
            }
2673
5.03k
        }
2674
2675
6.06k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
6.06k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
6.06k
        const auto& result = results.back();
2682
2683
6.06k
        if ( result.second != std::nullopt ) {
2684
3.01k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
3.01k
        }
2691
2692
6.06k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
6.06k
        if ( options.disableTests == false ) {
2701
6.06k
            tests::test(op, result.second);
2702
6.06k
        }
2703
2704
6.06k
        postprocess(module, op, result);
2705
6.06k
    }
2706
2707
1.17k
    if ( options.noCompare == false ) {
2708
1.02k
        compare(operations, results, data, size);
2709
1.02k
    }
2710
1.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.57k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.57k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.57k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
9.48k
    do {
2596
9.48k
        auto op = getOp(&parentDs, data, size);
2597
9.48k
        auto module = getModule(parentDs);
2598
9.48k
        if ( module == nullptr ) {
2599
4.64k
            continue;
2600
4.64k
        }
2601
2602
4.84k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
4.84k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
9
            break;
2607
9
        }
2608
9.47k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.57k
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.55k
#if 1
2616
1.55k
    {
2617
1.55k
        std::set<uint64_t> moduleIDs;
2618
2.87k
        for (const auto& m : modules ) {
2619
2.87k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.87k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.87k
            moduleIDs.insert(moduleID);
2627
2.87k
        }
2628
2629
1.55k
        std::set<uint64_t> operationModuleIDs;
2630
4.57k
        for (const auto& op : operations) {
2631
4.57k
            operationModuleIDs.insert(op.first->ID);
2632
4.57k
        }
2633
2634
1.55k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.55k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.55k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.55k
        for (const auto& id : addModuleIDs) {
2639
1.37k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.37k
        }
2641
1.55k
    }
2642
1.55k
#endif
2643
2644
1.55k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.55k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
7.51k
    for (size_t i = 0; i < operations.size(); i++) {
2652
5.95k
        auto& operation = operations[i];
2653
2654
5.95k
        auto& module = operation.first;
2655
5.95k
        auto& op = operation.second;
2656
2657
5.95k
        if ( i > 0 ) {
2658
4.52k
            auto& prevModule = operations[i-1].first;
2659
4.52k
            auto& prevOp = operations[i].second;
2660
2661
4.52k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
2.96k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
2.96k
                if ( curModifier.size() == 0 ) {
2664
1.09M
                    for (size_t j = 0; j < 512; j++) {
2665
1.09M
                        curModifier.push_back(1);
2666
1.09M
                    }
2667
2.13k
                } else {
2668
2.17k
                    for (auto& c : curModifier) {
2669
2.17k
                        c++;
2670
2.17k
                    }
2671
831
                }
2672
2.96k
            }
2673
4.52k
        }
2674
2675
5.95k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
5.95k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
5.95k
        const auto& result = results.back();
2682
2683
5.95k
        if ( result.second != std::nullopt ) {
2684
2.78k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
2.78k
        }
2691
2692
5.95k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
5.95k
        if ( options.disableTests == false ) {
2701
5.95k
            tests::test(op, result.second);
2702
5.95k
        }
2703
2704
5.95k
        postprocess(module, op, result);
2705
5.95k
    }
2706
2707
1.55k
    if ( options.noCompare == false ) {
2708
1.43k
        compare(operations, results, data, size);
2709
1.43k
    }
2710
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
6.16k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
6.16k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
6.16k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
32.5k
    do {
2596
32.5k
        auto op = getOp(&parentDs, data, size);
2597
32.5k
        auto module = getModule(parentDs);
2598
32.5k
        if ( module == nullptr ) {
2599
10.3k
            continue;
2600
10.3k
        }
2601
2602
22.1k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
22.1k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
20
            break;
2607
20
        }
2608
32.5k
    } while ( parentDs.Get<bool>() == true );
2609
2610
6.16k
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
6.13k
#if 1
2616
6.13k
    {
2617
6.13k
        std::set<uint64_t> moduleIDs;
2618
11.9k
        for (const auto& m : modules ) {
2619
11.9k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
11.9k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
11.9k
            moduleIDs.insert(moduleID);
2627
11.9k
        }
2628
2629
6.13k
        std::set<uint64_t> operationModuleIDs;
2630
21.7k
        for (const auto& op : operations) {
2631
21.7k
            operationModuleIDs.insert(op.first->ID);
2632
21.7k
        }
2633
2634
6.13k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
6.13k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
6.13k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
6.13k
        for (const auto& id : addModuleIDs) {
2639
5.85k
            operations.push_back({ modules.at(id), operations[0].second});
2640
5.85k
        }
2641
6.13k
    }
2642
6.13k
#endif
2643
2644
6.13k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
6.13k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
33.7k
    for (size_t i = 0; i < operations.size(); i++) {
2652
27.6k
        auto& operation = operations[i];
2653
2654
27.6k
        auto& module = operation.first;
2655
27.6k
        auto& op = operation.second;
2656
2657
27.6k
        if ( i > 0 ) {
2658
21.6k
            auto& prevModule = operations[i-1].first;
2659
21.6k
            auto& prevOp = operations[i].second;
2660
2661
21.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
15.3k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
15.3k
                if ( curModifier.size() == 0 ) {
2664
5.55M
                    for (size_t j = 0; j < 512; j++) {
2665
5.54M
                        curModifier.push_back(1);
2666
5.54M
                    }
2667
10.8k
                } else {
2668
94.0k
                    for (auto& c : curModifier) {
2669
94.0k
                        c++;
2670
94.0k
                    }
2671
4.51k
                }
2672
15.3k
            }
2673
21.6k
        }
2674
2675
27.6k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
27.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
27.6k
        const auto& result = results.back();
2682
2683
27.6k
        if ( result.second != std::nullopt ) {
2684
9.33k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
9.33k
        }
2691
2692
27.6k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
27.6k
        if ( options.disableTests == false ) {
2701
27.6k
            tests::test(op, result.second);
2702
27.6k
        }
2703
2704
27.6k
        postprocess(module, op, result);
2705
27.6k
    }
2706
2707
6.13k
    if ( options.noCompare == false ) {
2708
5.99k
        compare(operations, results, data, size);
2709
5.99k
    }
2710
6.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
5.94k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
5.94k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
5.94k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
23.6k
    do {
2596
23.6k
        auto op = getOp(&parentDs, data, size);
2597
23.6k
        auto module = getModule(parentDs);
2598
23.6k
        if ( module == nullptr ) {
2599
7.17k
            continue;
2600
7.17k
        }
2601
2602
16.4k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
16.4k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
10
            break;
2607
10
        }
2608
23.6k
    } while ( parentDs.Get<bool>() == true );
2609
2610
5.94k
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
5.92k
#if 1
2616
5.92k
    {
2617
5.92k
        std::set<uint64_t> moduleIDs;
2618
11.5k
        for (const auto& m : modules ) {
2619
11.5k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
11.5k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
11.5k
            moduleIDs.insert(moduleID);
2627
11.5k
        }
2628
2629
5.92k
        std::set<uint64_t> operationModuleIDs;
2630
16.0k
        for (const auto& op : operations) {
2631
16.0k
            operationModuleIDs.insert(op.first->ID);
2632
16.0k
        }
2633
2634
5.92k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
5.92k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
5.92k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
5.92k
        for (const auto& id : addModuleIDs) {
2639
5.68k
            operations.push_back({ modules.at(id), operations[0].second});
2640
5.68k
        }
2641
5.92k
    }
2642
5.92k
#endif
2643
2644
5.92k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
5.92k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
27.6k
    for (size_t i = 0; i < operations.size(); i++) {
2652
21.7k
        auto& operation = operations[i];
2653
2654
21.7k
        auto& module = operation.first;
2655
21.7k
        auto& op = operation.second;
2656
2657
21.7k
        if ( i > 0 ) {
2658
16.0k
            auto& prevModule = operations[i-1].first;
2659
16.0k
            auto& prevOp = operations[i].second;
2660
2661
16.0k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
10.1k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
10.1k
                if ( curModifier.size() == 0 ) {
2664
3.44M
                    for (size_t j = 0; j < 512; j++) {
2665
3.43M
                        curModifier.push_back(1);
2666
3.43M
                    }
2667
6.71k
                } else {
2668
46.2k
                    for (auto& c : curModifier) {
2669
46.2k
                        c++;
2670
46.2k
                    }
2671
3.38k
                }
2672
10.1k
            }
2673
16.0k
        }
2674
2675
21.7k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
21.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
21.7k
        const auto& result = results.back();
2682
2683
21.7k
        if ( result.second != std::nullopt ) {
2684
1.67k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.67k
        }
2691
2692
21.7k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
21.7k
        if ( options.disableTests == false ) {
2701
21.7k
            tests::test(op, result.second);
2702
21.7k
        }
2703
2704
21.7k
        postprocess(module, op, result);
2705
21.7k
    }
2706
2707
5.92k
    if ( options.noCompare == false ) {
2708
5.77k
        compare(operations, results, data, size);
2709
5.77k
    }
2710
5.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
446
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
446
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
446
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.79k
    do {
2596
5.79k
        auto op = getOp(&parentDs, data, size);
2597
5.79k
        auto module = getModule(parentDs);
2598
5.79k
        if ( module == nullptr ) {
2599
4.07k
            continue;
2600
4.07k
        }
2601
2602
1.71k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.71k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
5.78k
    } while ( parentDs.Get<bool>() == true );
2609
2610
446
    if ( operations.empty() == true ) {
2611
44
        return;
2612
44
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
402
#if 1
2616
402
    {
2617
402
        std::set<uint64_t> moduleIDs;
2618
480
        for (const auto& m : modules ) {
2619
480
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
480
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
480
            moduleIDs.insert(moduleID);
2627
480
        }
2628
2629
402
        std::set<uint64_t> operationModuleIDs;
2630
1.36k
        for (const auto& op : operations) {
2631
1.36k
            operationModuleIDs.insert(op.first->ID);
2632
1.36k
        }
2633
2634
402
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
402
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
402
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
402
        for (const auto& id : addModuleIDs) {
2639
196
            operations.push_back({ modules.at(id), operations[0].second});
2640
196
        }
2641
402
    }
2642
402
#endif
2643
2644
402
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
402
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.96k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.56k
        auto& operation = operations[i];
2653
2654
1.56k
        auto& module = operation.first;
2655
1.56k
        auto& op = operation.second;
2656
2657
1.56k
        if ( i > 0 ) {
2658
1.32k
            auto& prevModule = operations[i-1].first;
2659
1.32k
            auto& prevOp = operations[i].second;
2660
2661
1.32k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.01k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.01k
                if ( curModifier.size() == 0 ) {
2664
424k
                    for (size_t j = 0; j < 512; j++) {
2665
423k
                        curModifier.push_back(1);
2666
423k
                    }
2667
827
                } else {
2668
834
                    for (auto& c : curModifier) {
2669
834
                        c++;
2670
834
                    }
2671
185
                }
2672
1.01k
            }
2673
1.32k
        }
2674
2675
1.56k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.56k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.56k
        const auto& result = results.back();
2682
2683
1.56k
        if ( result.second != std::nullopt ) {
2684
429
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
429
        }
2691
2692
1.56k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.56k
        if ( options.disableTests == false ) {
2701
1.56k
            tests::test(op, result.second);
2702
1.56k
        }
2703
2704
1.56k
        postprocess(module, op, result);
2705
1.56k
    }
2706
2707
402
    if ( options.noCompare == false ) {
2708
240
        compare(operations, results, data, size);
2709
240
    }
2710
402
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
3.80k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
3.80k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
3.80k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
13.0k
    do {
2596
13.0k
        auto op = getOp(&parentDs, data, size);
2597
13.0k
        auto module = getModule(parentDs);
2598
13.0k
        if ( module == nullptr ) {
2599
5.07k
            continue;
2600
5.07k
        }
2601
2602
7.97k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
7.97k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
13.0k
    } while ( parentDs.Get<bool>() == true );
2609
2610
3.80k
    if ( operations.empty() == true ) {
2611
87
        return;
2612
87
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
3.71k
#if 1
2616
3.71k
    {
2617
3.71k
        std::set<uint64_t> moduleIDs;
2618
7.02k
        for (const auto& m : modules ) {
2619
7.02k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
7.02k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
7.02k
            moduleIDs.insert(moduleID);
2627
7.02k
        }
2628
2629
3.71k
        std::set<uint64_t> operationModuleIDs;
2630
7.59k
        for (const auto& op : operations) {
2631
7.59k
            operationModuleIDs.insert(op.first->ID);
2632
7.59k
        }
2633
2634
3.71k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
3.71k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
3.71k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
3.71k
        for (const auto& id : addModuleIDs) {
2639
3.45k
            operations.push_back({ modules.at(id), operations[0].second});
2640
3.45k
        }
2641
3.71k
    }
2642
3.71k
#endif
2643
2644
3.71k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
3.71k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
14.7k
    for (size_t i = 0; i < operations.size(); i++) {
2652
11.0k
        auto& operation = operations[i];
2653
2654
11.0k
        auto& module = operation.first;
2655
11.0k
        auto& op = operation.second;
2656
2657
11.0k
        if ( i > 0 ) {
2658
7.53k
            auto& prevModule = operations[i-1].first;
2659
7.53k
            auto& prevOp = operations[i].second;
2660
2661
7.53k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
3.94k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
3.94k
                if ( curModifier.size() == 0 ) {
2664
1.52M
                    for (size_t j = 0; j < 512; j++) {
2665
1.51M
                        curModifier.push_back(1);
2666
1.51M
                    }
2667
2.96k
                } else {
2668
2.08k
                    for (auto& c : curModifier) {
2669
2.08k
                        c++;
2670
2.08k
                    }
2671
984
                }
2672
3.94k
            }
2673
7.53k
        }
2674
2675
11.0k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
11.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
11.0k
        const auto& result = results.back();
2682
2683
11.0k
        if ( result.second != std::nullopt ) {
2684
4.55k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
4.55k
        }
2691
2692
11.0k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
11.0k
        if ( options.disableTests == false ) {
2701
11.0k
            tests::test(op, result.second);
2702
11.0k
        }
2703
2704
11.0k
        postprocess(module, op, result);
2705
11.0k
    }
2706
2707
3.71k
    if ( options.noCompare == false ) {
2708
3.51k
        compare(operations, results, data, size);
2709
3.51k
    }
2710
3.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
374
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
374
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
374
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.67k
    do {
2596
5.67k
        auto op = getOp(&parentDs, data, size);
2597
5.67k
        auto module = getModule(parentDs);
2598
5.67k
        if ( module == nullptr ) {
2599
4.41k
            continue;
2600
4.41k
        }
2601
2602
1.26k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.26k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
5.67k
    } while ( parentDs.Get<bool>() == true );
2609
2610
374
    if ( operations.empty() == true ) {
2611
32
        return;
2612
32
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
342
#if 1
2616
342
    {
2617
342
        std::set<uint64_t> moduleIDs;
2618
396
        for (const auto& m : modules ) {
2619
396
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
396
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
396
            moduleIDs.insert(moduleID);
2627
396
        }
2628
2629
342
        std::set<uint64_t> operationModuleIDs;
2630
895
        for (const auto& op : operations) {
2631
895
            operationModuleIDs.insert(op.first->ID);
2632
895
        }
2633
2634
342
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
342
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
342
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
342
        for (const auto& id : addModuleIDs) {
2639
155
            operations.push_back({ modules.at(id), operations[0].second});
2640
155
        }
2641
342
    }
2642
342
#endif
2643
2644
342
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
342
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.39k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.05k
        auto& operation = operations[i];
2653
2654
1.05k
        auto& module = operation.first;
2655
1.05k
        auto& op = operation.second;
2656
2657
1.05k
        if ( i > 0 ) {
2658
852
            auto& prevModule = operations[i-1].first;
2659
852
            auto& prevOp = operations[i].second;
2660
2661
852
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
559
                auto& curModifier = op.modifier.GetVectorPtr();
2663
559
                if ( curModifier.size() == 0 ) {
2664
169k
                    for (size_t j = 0; j < 512; j++) {
2665
169k
                        curModifier.push_back(1);
2666
169k
                    }
2667
331
                } else {
2668
1.09k
                    for (auto& c : curModifier) {
2669
1.09k
                        c++;
2670
1.09k
                    }
2671
228
                }
2672
559
            }
2673
852
        }
2674
2675
1.05k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.05k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.05k
        const auto& result = results.back();
2682
2683
1.05k
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
1.05k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.05k
        if ( options.disableTests == false ) {
2701
1.05k
            tests::test(op, result.second);
2702
1.05k
        }
2703
2704
1.05k
        postprocess(module, op, result);
2705
1.05k
    }
2706
2707
342
    if ( options.noCompare == false ) {
2708
198
        compare(operations, results, data, size);
2709
198
    }
2710
342
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
242
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
242
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
242
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.87k
    do {
2596
4.87k
        auto op = getOp(&parentDs, data, size);
2597
4.87k
        auto module = getModule(parentDs);
2598
4.87k
        if ( module == nullptr ) {
2599
3.83k
            continue;
2600
3.83k
        }
2601
2602
1.04k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.04k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
4.87k
    } while ( parentDs.Get<bool>() == true );
2609
2610
242
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
219
#if 1
2616
219
    {
2617
219
        std::set<uint64_t> moduleIDs;
2618
219
        for (const auto& m : modules ) {
2619
198
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
198
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
198
            moduleIDs.insert(moduleID);
2627
198
        }
2628
2629
219
        std::set<uint64_t> operationModuleIDs;
2630
665
        for (const auto& op : operations) {
2631
665
            operationModuleIDs.insert(op.first->ID);
2632
665
        }
2633
2634
219
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
219
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
219
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
219
        for (const auto& id : addModuleIDs) {
2639
62
            operations.push_back({ modules.at(id), operations[0].second});
2640
62
        }
2641
219
    }
2642
219
#endif
2643
2644
219
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
219
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
946
    for (size_t i = 0; i < operations.size(); i++) {
2652
727
        auto& operation = operations[i];
2653
2654
727
        auto& module = operation.first;
2655
727
        auto& op = operation.second;
2656
2657
727
        if ( i > 0 ) {
2658
628
            auto& prevModule = operations[i-1].first;
2659
628
            auto& prevOp = operations[i].second;
2660
2661
628
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
478
                auto& curModifier = op.modifier.GetVectorPtr();
2663
478
                if ( curModifier.size() == 0 ) {
2664
140k
                    for (size_t j = 0; j < 512; j++) {
2665
139k
                        curModifier.push_back(1);
2666
139k
                    }
2667
273
                } else {
2668
1.24k
                    for (auto& c : curModifier) {
2669
1.24k
                        c++;
2670
1.24k
                    }
2671
205
                }
2672
478
            }
2673
628
        }
2674
2675
727
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
727
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
727
        const auto& result = results.back();
2682
2683
727
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
727
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
727
        if ( options.disableTests == false ) {
2701
727
            tests::test(op, result.second);
2702
727
        }
2703
2704
727
        postprocess(module, op, result);
2705
727
    }
2706
2707
219
    if ( options.noCompare == false ) {
2708
99
        compare(operations, results, data, size);
2709
99
    }
2710
219
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
261
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
261
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
261
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.77k
    do {
2596
4.77k
        auto op = getOp(&parentDs, data, size);
2597
4.77k
        auto module = getModule(parentDs);
2598
4.77k
        if ( module == nullptr ) {
2599
3.65k
            continue;
2600
3.65k
        }
2601
2602
1.12k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.12k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
3
            break;
2607
3
        }
2608
4.77k
    } while ( parentDs.Get<bool>() == true );
2609
2610
261
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
243
#if 1
2616
243
    {
2617
243
        std::set<uint64_t> moduleIDs;
2618
248
        for (const auto& m : modules ) {
2619
248
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
248
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
248
            moduleIDs.insert(moduleID);
2627
248
        }
2628
2629
243
        std::set<uint64_t> operationModuleIDs;
2630
781
        for (const auto& op : operations) {
2631
781
            operationModuleIDs.insert(op.first->ID);
2632
781
        }
2633
2634
243
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
243
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
243
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
243
        for (const auto& id : addModuleIDs) {
2639
86
            operations.push_back({ modules.at(id), operations[0].second});
2640
86
        }
2641
243
    }
2642
243
#endif
2643
2644
243
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
243
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.11k
    for (size_t i = 0; i < operations.size(); i++) {
2652
867
        auto& operation = operations[i];
2653
2654
867
        auto& module = operation.first;
2655
867
        auto& op = operation.second;
2656
2657
867
        if ( i > 0 ) {
2658
743
            auto& prevModule = operations[i-1].first;
2659
743
            auto& prevOp = operations[i].second;
2660
2661
743
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
554
                auto& curModifier = op.modifier.GetVectorPtr();
2663
554
                if ( curModifier.size() == 0 ) {
2664
135k
                    for (size_t j = 0; j < 512; j++) {
2665
135k
                        curModifier.push_back(1);
2666
135k
                    }
2667
289
                } else {
2668
829
                    for (auto& c : curModifier) {
2669
829
                        c++;
2670
829
                    }
2671
289
                }
2672
554
            }
2673
743
        }
2674
2675
867
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
867
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
867
        const auto& result = results.back();
2682
2683
867
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
867
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
867
        if ( options.disableTests == false ) {
2701
867
            tests::test(op, result.second);
2702
867
        }
2703
2704
867
        postprocess(module, op, result);
2705
867
    }
2706
2707
243
    if ( options.noCompare == false ) {
2708
124
        compare(operations, results, data, size);
2709
124
    }
2710
243
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
948
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
948
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
948
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
7.47k
    do {
2596
7.47k
        auto op = getOp(&parentDs, data, size);
2597
7.47k
        auto module = getModule(parentDs);
2598
7.47k
        if ( module == nullptr ) {
2599
4.58k
            continue;
2600
4.58k
        }
2601
2602
2.88k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.88k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
7
            break;
2607
7
        }
2608
7.47k
    } while ( parentDs.Get<bool>() == true );
2609
2610
948
    if ( operations.empty() == true ) {
2611
22
        return;
2612
22
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
926
#if 1
2616
926
    {
2617
926
        std::set<uint64_t> moduleIDs;
2618
1.60k
        for (const auto& m : modules ) {
2619
1.60k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.60k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.60k
            moduleIDs.insert(moduleID);
2627
1.60k
        }
2628
2629
926
        std::set<uint64_t> operationModuleIDs;
2630
2.54k
        for (const auto& op : operations) {
2631
2.54k
            operationModuleIDs.insert(op.first->ID);
2632
2.54k
        }
2633
2634
926
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
926
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
926
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
926
        for (const auto& id : addModuleIDs) {
2639
760
            operations.push_back({ modules.at(id), operations[0].second});
2640
760
        }
2641
926
    }
2642
926
#endif
2643
2644
926
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
926
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.23k
    for (size_t i = 0; i < operations.size(); i++) {
2652
3.30k
        auto& operation = operations[i];
2653
2654
3.30k
        auto& module = operation.first;
2655
3.30k
        auto& op = operation.second;
2656
2657
3.30k
        if ( i > 0 ) {
2658
2.50k
            auto& prevModule = operations[i-1].first;
2659
2.50k
            auto& prevOp = operations[i].second;
2660
2661
2.50k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.61k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.61k
                if ( curModifier.size() == 0 ) {
2664
617k
                    for (size_t j = 0; j < 512; j++) {
2665
615k
                        curModifier.push_back(1);
2666
615k
                    }
2667
1.20k
                } else {
2668
1.20k
                    for (auto& c : curModifier) {
2669
1.20k
                        c++;
2670
1.20k
                    }
2671
415
                }
2672
1.61k
            }
2673
2.50k
        }
2674
2675
3.30k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
3.30k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
3.30k
        const auto& result = results.back();
2682
2683
3.30k
        if ( result.second != std::nullopt ) {
2684
1.57k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.57k
        }
2691
2692
3.30k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
3.30k
        if ( options.disableTests == false ) {
2701
3.30k
            tests::test(op, result.second);
2702
3.30k
        }
2703
2704
3.30k
        postprocess(module, op, result);
2705
3.30k
    }
2706
2707
926
    if ( options.noCompare == false ) {
2708
804
        compare(operations, results, data, size);
2709
804
    }
2710
926
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
654
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
654
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
654
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.02k
    do {
2596
5.02k
        auto op = getOp(&parentDs, data, size);
2597
5.02k
        auto module = getModule(parentDs);
2598
5.02k
        if ( module == nullptr ) {
2599
4.12k
            continue;
2600
4.12k
        }
2601
2602
895
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
895
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
87
            break;
2607
87
        }
2608
4.93k
    } while ( parentDs.Get<bool>() == true );
2609
2610
654
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
627
#if 1
2616
627
    {
2617
627
        std::set<uint64_t> moduleIDs;
2618
994
        for (const auto& m : modules ) {
2619
994
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
994
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
994
            moduleIDs.insert(moduleID);
2627
994
        }
2628
2629
627
        std::set<uint64_t> operationModuleIDs;
2630
727
        for (const auto& op : operations) {
2631
727
            operationModuleIDs.insert(op.first->ID);
2632
727
        }
2633
2634
627
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
627
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
627
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
627
        for (const auto& id : addModuleIDs) {
2639
485
            operations.push_back({ modules.at(id), operations[0].second});
2640
485
        }
2641
627
    }
2642
627
#endif
2643
2644
627
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
627
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.83k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.21k
        auto& operation = operations[i];
2653
2654
1.21k
        auto& module = operation.first;
2655
1.21k
        auto& op = operation.second;
2656
2657
1.21k
        if ( i > 0 ) {
2658
715
            auto& prevModule = operations[i-1].first;
2659
715
            auto& prevOp = operations[i].second;
2660
2661
715
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
216
                auto& curModifier = op.modifier.GetVectorPtr();
2663
216
                if ( curModifier.size() == 0 ) {
2664
87.7k
                    for (size_t j = 0; j < 512; j++) {
2665
87.5k
                        curModifier.push_back(1);
2666
87.5k
                    }
2667
171
                } else {
2668
718
                    for (auto& c : curModifier) {
2669
718
                        c++;
2670
718
                    }
2671
45
                }
2672
216
            }
2673
715
        }
2674
2675
1.21k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.21k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.21k
        const auto& result = results.back();
2682
2683
1.21k
        if ( result.second != std::nullopt ) {
2684
576
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
576
        }
2691
2692
1.21k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.21k
        if ( options.disableTests == false ) {
2701
1.21k
            tests::test(op, result.second);
2702
1.21k
        }
2703
2704
1.21k
        postprocess(module, op, result);
2705
1.21k
    }
2706
2707
627
    if ( options.noCompare == false ) {
2708
497
        compare(operations, results, data, size);
2709
497
    }
2710
627
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
325
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
325
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
325
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.85k
    do {
2596
4.85k
        auto op = getOp(&parentDs, data, size);
2597
4.85k
        auto module = getModule(parentDs);
2598
4.85k
        if ( module == nullptr ) {
2599
3.63k
            continue;
2600
3.63k
        }
2601
2602
1.22k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.22k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
4.85k
    } while ( parentDs.Get<bool>() == true );
2609
2610
325
    if ( operations.empty() == true ) {
2611
31
        return;
2612
31
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
294
#if 1
2616
294
    {
2617
294
        std::set<uint64_t> moduleIDs;
2618
294
        for (const auto& m : modules ) {
2619
236
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
236
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
236
            moduleIDs.insert(moduleID);
2627
236
        }
2628
2629
294
        std::set<uint64_t> operationModuleIDs;
2630
746
        for (const auto& op : operations) {
2631
746
            operationModuleIDs.insert(op.first->ID);
2632
746
        }
2633
2634
294
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
294
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
294
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
294
        for (const auto& id : addModuleIDs) {
2639
70
            operations.push_back({ modules.at(id), operations[0].second});
2640
70
        }
2641
294
    }
2642
294
#endif
2643
2644
294
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
294
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.11k
    for (size_t i = 0; i < operations.size(); i++) {
2652
816
        auto& operation = operations[i];
2653
2654
816
        auto& module = operation.first;
2655
816
        auto& op = operation.second;
2656
2657
816
        if ( i > 0 ) {
2658
698
            auto& prevModule = operations[i-1].first;
2659
698
            auto& prevOp = operations[i].second;
2660
2661
698
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
516
                auto& curModifier = op.modifier.GetVectorPtr();
2663
516
                if ( curModifier.size() == 0 ) {
2664
189k
                    for (size_t j = 0; j < 512; j++) {
2665
188k
                        curModifier.push_back(1);
2666
188k
                    }
2667
369
                } else {
2668
1.02k
                    for (auto& c : curModifier) {
2669
1.02k
                        c++;
2670
1.02k
                    }
2671
147
                }
2672
516
            }
2673
698
        }
2674
2675
816
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
816
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
816
        const auto& result = results.back();
2682
2683
816
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
816
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
816
        if ( options.disableTests == false ) {
2701
816
            tests::test(op, result.second);
2702
816
        }
2703
2704
816
        postprocess(module, op, result);
2705
816
    }
2706
2707
294
    if ( options.noCompare == false ) {
2708
118
        compare(operations, results, data, size);
2709
118
    }
2710
294
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
266
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
266
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
266
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.02k
    do {
2596
5.02k
        auto op = getOp(&parentDs, data, size);
2597
5.02k
        auto module = getModule(parentDs);
2598
5.02k
        if ( module == nullptr ) {
2599
3.92k
            continue;
2600
3.92k
        }
2601
2602
1.09k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.09k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
5
            break;
2607
5
        }
2608
5.01k
    } while ( parentDs.Get<bool>() == true );
2609
2610
266
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
247
#if 1
2616
247
    {
2617
247
        std::set<uint64_t> moduleIDs;
2618
247
        for (const auto& m : modules ) {
2619
194
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
194
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
194
            moduleIDs.insert(moduleID);
2627
194
        }
2628
2629
247
        std::set<uint64_t> operationModuleIDs;
2630
714
        for (const auto& op : operations) {
2631
714
            operationModuleIDs.insert(op.first->ID);
2632
714
        }
2633
2634
247
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
247
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
247
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
247
        for (const auto& id : addModuleIDs) {
2639
49
            operations.push_back({ modules.at(id), operations[0].second});
2640
49
        }
2641
247
    }
2642
247
#endif
2643
2644
247
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
247
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.01k
    for (size_t i = 0; i < operations.size(); i++) {
2652
763
        auto& operation = operations[i];
2653
2654
763
        auto& module = operation.first;
2655
763
        auto& op = operation.second;
2656
2657
763
        if ( i > 0 ) {
2658
666
            auto& prevModule = operations[i-1].first;
2659
666
            auto& prevOp = operations[i].second;
2660
2661
666
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
447
                auto& curModifier = op.modifier.GetVectorPtr();
2663
447
                if ( curModifier.size() == 0 ) {
2664
149k
                    for (size_t j = 0; j < 512; j++) {
2665
148k
                        curModifier.push_back(1);
2666
148k
                    }
2667
291
                } else {
2668
1.16k
                    for (auto& c : curModifier) {
2669
1.16k
                        c++;
2670
1.16k
                    }
2671
156
                }
2672
447
            }
2673
666
        }
2674
2675
763
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
763
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
763
        const auto& result = results.back();
2682
2683
763
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
763
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
763
        if ( options.disableTests == false ) {
2701
763
            tests::test(op, result.second);
2702
763
        }
2703
2704
763
        postprocess(module, op, result);
2705
763
    }
2706
2707
247
    if ( options.noCompare == false ) {
2708
97
        compare(operations, results, data, size);
2709
97
    }
2710
247
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
298
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
298
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
298
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.19k
    do {
2596
4.19k
        auto op = getOp(&parentDs, data, size);
2597
4.19k
        auto module = getModule(parentDs);
2598
4.19k
        if ( module == nullptr ) {
2599
3.91k
            continue;
2600
3.91k
        }
2601
2602
280
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
280
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
39
            break;
2607
39
        }
2608
4.15k
    } while ( parentDs.Get<bool>() == true );
2609
2610
298
    if ( operations.empty() == true ) {
2611
39
        return;
2612
39
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
259
#if 1
2616
259
    {
2617
259
        std::set<uint64_t> moduleIDs;
2618
264
        for (const auto& m : modules ) {
2619
264
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
264
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
264
            moduleIDs.insert(moduleID);
2627
264
        }
2628
2629
259
        std::set<uint64_t> operationModuleIDs;
2630
259
        for (const auto& op : operations) {
2631
171
            operationModuleIDs.insert(op.first->ID);
2632
171
        }
2633
2634
259
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
259
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
259
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
259
        for (const auto& id : addModuleIDs) {
2639
128
            operations.push_back({ modules.at(id), operations[0].second});
2640
128
        }
2641
259
    }
2642
259
#endif
2643
2644
259
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
259
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
558
    for (size_t i = 0; i < operations.size(); i++) {
2652
299
        auto& operation = operations[i];
2653
2654
299
        auto& module = operation.first;
2655
299
        auto& op = operation.second;
2656
2657
299
        if ( i > 0 ) {
2658
167
            auto& prevModule = operations[i-1].first;
2659
167
            auto& prevOp = operations[i].second;
2660
2661
167
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
35
                auto& curModifier = op.modifier.GetVectorPtr();
2663
35
                if ( curModifier.size() == 0 ) {
2664
9.74k
                    for (size_t j = 0; j < 512; j++) {
2665
9.72k
                        curModifier.push_back(1);
2666
9.72k
                    }
2667
19
                } else {
2668
553
                    for (auto& c : curModifier) {
2669
553
                        c++;
2670
553
                    }
2671
16
                }
2672
35
            }
2673
167
        }
2674
2675
299
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
299
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
299
        const auto& result = results.back();
2682
2683
299
        if ( result.second != std::nullopt ) {
2684
73
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
73
        }
2691
2692
299
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
299
        if ( options.disableTests == false ) {
2701
299
            tests::test(op, result.second);
2702
299
        }
2703
2704
299
        postprocess(module, op, result);
2705
299
    }
2706
2707
259
    if ( options.noCompare == false ) {
2708
132
        compare(operations, results, data, size);
2709
132
    }
2710
259
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
782
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
782
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
782
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
7.14k
    do {
2596
7.14k
        auto op = getOp(&parentDs, data, size);
2597
7.14k
        auto module = getModule(parentDs);
2598
7.14k
        if ( module == nullptr ) {
2599
4.29k
            continue;
2600
4.29k
        }
2601
2602
2.84k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.84k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
4
            break;
2607
4
        }
2608
7.13k
    } while ( parentDs.Get<bool>() == true );
2609
2610
782
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
761
#if 1
2616
761
    {
2617
761
        std::set<uint64_t> moduleIDs;
2618
1.23k
        for (const auto& m : modules ) {
2619
1.23k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.23k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.23k
            moduleIDs.insert(moduleID);
2627
1.23k
        }
2628
2629
761
        std::set<uint64_t> operationModuleIDs;
2630
2.40k
        for (const auto& op : operations) {
2631
2.40k
            operationModuleIDs.insert(op.first->ID);
2632
2.40k
        }
2633
2634
761
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
761
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
761
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
761
        for (const auto& id : addModuleIDs) {
2639
573
            operations.push_back({ modules.at(id), operations[0].second});
2640
573
        }
2641
761
    }
2642
761
#endif
2643
2644
761
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
761
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.73k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.97k
        auto& operation = operations[i];
2653
2654
2.97k
        auto& module = operation.first;
2655
2.97k
        auto& op = operation.second;
2656
2657
2.97k
        if ( i > 0 ) {
2658
2.35k
            auto& prevModule = operations[i-1].first;
2659
2.35k
            auto& prevOp = operations[i].second;
2660
2661
2.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.70k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.70k
                if ( curModifier.size() == 0 ) {
2664
720k
                    for (size_t j = 0; j < 512; j++) {
2665
719k
                        curModifier.push_back(1);
2666
719k
                    }
2667
1.40k
                } else {
2668
964
                    for (auto& c : curModifier) {
2669
964
                        c++;
2670
964
                    }
2671
302
                }
2672
1.70k
            }
2673
2.35k
        }
2674
2675
2.97k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.97k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.97k
        const auto& result = results.back();
2682
2683
2.97k
        if ( result.second != std::nullopt ) {
2684
1.22k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.22k
        }
2691
2692
2.97k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.97k
        if ( options.disableTests == false ) {
2701
2.97k
            tests::test(op, result.second);
2702
2.97k
        }
2703
2704
2.97k
        postprocess(module, op, result);
2705
2.97k
    }
2706
2707
761
    if ( options.noCompare == false ) {
2708
615
        compare(operations, results, data, size);
2709
615
    }
2710
761
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.83k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.83k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.83k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.55k
    do {
2596
5.55k
        auto op = getOp(&parentDs, data, size);
2597
5.55k
        auto module = getModule(parentDs);
2598
5.55k
        if ( module == nullptr ) {
2599
2.92k
            continue;
2600
2.92k
        }
2601
2602
2.62k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.62k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
65
            break;
2607
65
        }
2608
5.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.83k
    if ( operations.empty() == true ) {
2611
49
        return;
2612
49
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.78k
#if 1
2616
1.78k
    {
2617
1.78k
        std::set<uint64_t> moduleIDs;
2618
3.25k
        for (const auto& m : modules ) {
2619
3.25k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
3.25k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
3.25k
            moduleIDs.insert(moduleID);
2627
3.25k
        }
2628
2629
1.78k
        std::set<uint64_t> operationModuleIDs;
2630
2.49k
        for (const auto& op : operations) {
2631
2.49k
            operationModuleIDs.insert(op.first->ID);
2632
2.49k
        }
2633
2634
1.78k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.78k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.78k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.78k
        for (const auto& id : addModuleIDs) {
2639
1.59k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.59k
        }
2641
1.78k
    }
2642
1.78k
#endif
2643
2644
1.78k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.78k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
5.86k
    for (size_t i = 0; i < operations.size(); i++) {
2652
4.08k
        auto& operation = operations[i];
2653
2654
4.08k
        auto& module = operation.first;
2655
4.08k
        auto& op = operation.second;
2656
2657
4.08k
        if ( i > 0 ) {
2658
2.46k
            auto& prevModule = operations[i-1].first;
2659
2.46k
            auto& prevOp = operations[i].second;
2660
2661
2.46k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
806
                auto& curModifier = op.modifier.GetVectorPtr();
2663
806
                if ( curModifier.size() == 0 ) {
2664
322k
                    for (size_t j = 0; j < 512; j++) {
2665
321k
                        curModifier.push_back(1);
2666
321k
                    }
2667
628
                } else {
2668
2.97k
                    for (auto& c : curModifier) {
2669
2.97k
                        c++;
2670
2.97k
                    }
2671
178
                }
2672
806
            }
2673
2.46k
        }
2674
2675
4.08k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
4.08k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
4.08k
        const auto& result = results.back();
2682
2683
4.08k
        if ( result.second != std::nullopt ) {
2684
1.09k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.09k
        }
2691
2692
4.08k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
4.08k
        if ( options.disableTests == false ) {
2701
4.08k
            tests::test(op, result.second);
2702
4.08k
        }
2703
2704
4.08k
        postprocess(module, op, result);
2705
4.08k
    }
2706
2707
1.78k
    if ( options.noCompare == false ) {
2708
1.62k
        compare(operations, results, data, size);
2709
1.62k
    }
2710
1.78k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
918
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
918
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
918
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.26k
    do {
2596
4.26k
        auto op = getOp(&parentDs, data, size);
2597
4.26k
        auto module = getModule(parentDs);
2598
4.26k
        if ( module == nullptr ) {
2599
3.09k
            continue;
2600
3.09k
        }
2601
2602
1.17k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.17k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
16
            break;
2607
16
        }
2608
4.25k
    } while ( parentDs.Get<bool>() == true );
2609
2610
918
    if ( operations.empty() == true ) {
2611
37
        return;
2612
37
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
881
#if 1
2616
881
    {
2617
881
        std::set<uint64_t> moduleIDs;
2618
1.44k
        for (const auto& m : modules ) {
2619
1.44k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.44k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.44k
            moduleIDs.insert(moduleID);
2627
1.44k
        }
2628
2629
881
        std::set<uint64_t> operationModuleIDs;
2630
1.03k
        for (const auto& op : operations) {
2631
1.03k
            operationModuleIDs.insert(op.first->ID);
2632
1.03k
        }
2633
2634
881
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
881
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
881
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
881
        for (const auto& id : addModuleIDs) {
2639
692
            operations.push_back({ modules.at(id), operations[0].second});
2640
692
        }
2641
881
    }
2642
881
#endif
2643
2644
881
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
881
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.60k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.72k
        auto& operation = operations[i];
2653
2654
1.72k
        auto& module = operation.first;
2655
1.72k
        auto& op = operation.second;
2656
2657
1.72k
        if ( i > 0 ) {
2658
1.00k
            auto& prevModule = operations[i-1].first;
2659
1.00k
            auto& prevOp = operations[i].second;
2660
2661
1.00k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
270
                auto& curModifier = op.modifier.GetVectorPtr();
2663
270
                if ( curModifier.size() == 0 ) {
2664
89.2k
                    for (size_t j = 0; j < 512; j++) {
2665
89.0k
                        curModifier.push_back(1);
2666
89.0k
                    }
2667
174
                } else {
2668
638
                    for (auto& c : curModifier) {
2669
638
                        c++;
2670
638
                    }
2671
96
                }
2672
270
            }
2673
1.00k
        }
2674
2675
1.72k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.72k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.72k
        const auto& result = results.back();
2682
2683
1.72k
        if ( result.second != std::nullopt ) {
2684
1.24k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.24k
        }
2691
2692
1.72k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.72k
        if ( options.disableTests == false ) {
2701
1.72k
            tests::test(op, result.second);
2702
1.72k
        }
2703
2704
1.72k
        postprocess(module, op, result);
2705
1.72k
    }
2706
2707
881
    if ( options.noCompare == false ) {
2708
720
        compare(operations, results, data, size);
2709
720
    }
2710
881
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.62k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.62k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.62k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.62k
    do {
2596
5.62k
        auto op = getOp(&parentDs, data, size);
2597
5.62k
        auto module = getModule(parentDs);
2598
5.62k
        if ( module == nullptr ) {
2599
3.90k
            continue;
2600
3.90k
        }
2601
2602
1.72k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.72k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
20
            break;
2607
20
        }
2608
5.60k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.62k
    if ( operations.empty() == true ) {
2611
58
        return;
2612
58
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.56k
#if 1
2616
1.56k
    {
2617
1.56k
        std::set<uint64_t> moduleIDs;
2618
2.68k
        for (const auto& m : modules ) {
2619
2.68k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.68k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.68k
            moduleIDs.insert(moduleID);
2627
2.68k
        }
2628
2629
1.56k
        std::set<uint64_t> operationModuleIDs;
2630
1.61k
        for (const auto& op : operations) {
2631
1.61k
            operationModuleIDs.insert(op.first->ID);
2632
1.61k
        }
2633
2634
1.56k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.56k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.56k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.56k
        for (const auto& id : addModuleIDs) {
2639
1.31k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.31k
        }
2641
1.56k
    }
2642
1.56k
#endif
2643
2644
1.56k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.56k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.49k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.92k
        auto& operation = operations[i];
2653
2654
2.92k
        auto& module = operation.first;
2655
2.92k
        auto& op = operation.second;
2656
2657
2.92k
        if ( i > 0 ) {
2658
1.58k
            auto& prevModule = operations[i-1].first;
2659
1.58k
            auto& prevOp = operations[i].second;
2660
2661
1.58k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
229
                auto& curModifier = op.modifier.GetVectorPtr();
2663
229
                if ( curModifier.size() == 0 ) {
2664
82.0k
                    for (size_t j = 0; j < 512; j++) {
2665
81.9k
                        curModifier.push_back(1);
2666
81.9k
                    }
2667
160
                } else {
2668
791
                    for (auto& c : curModifier) {
2669
791
                        c++;
2670
791
                    }
2671
69
                }
2672
229
            }
2673
1.58k
        }
2674
2675
2.92k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.92k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.92k
        const auto& result = results.back();
2682
2683
2.92k
        if ( result.second != std::nullopt ) {
2684
705
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
705
        }
2691
2692
2.92k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.92k
        if ( options.disableTests == false ) {
2701
2.92k
            tests::test(op, result.second);
2702
2.92k
        }
2703
2704
2.92k
        postprocess(module, op, result);
2705
2.92k
    }
2706
2707
1.56k
    if ( options.noCompare == false ) {
2708
1.34k
        compare(operations, results, data, size);
2709
1.34k
    }
2710
1.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
214
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
214
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
214
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.80k
    do {
2596
4.80k
        auto op = getOp(&parentDs, data, size);
2597
4.80k
        auto module = getModule(parentDs);
2598
4.80k
        if ( module == nullptr ) {
2599
4.37k
            continue;
2600
4.37k
        }
2601
2602
436
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
436
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.79k
    } while ( parentDs.Get<bool>() == true );
2609
2610
214
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
200
#if 1
2616
200
    {
2617
200
        std::set<uint64_t> moduleIDs;
2618
200
        for (const auto& m : modules ) {
2619
186
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
186
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
186
            moduleIDs.insert(moduleID);
2627
186
        }
2628
2629
200
        std::set<uint64_t> operationModuleIDs;
2630
265
        for (const auto& op : operations) {
2631
265
            operationModuleIDs.insert(op.first->ID);
2632
265
        }
2633
2634
200
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
200
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
200
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
200
        for (const auto& id : addModuleIDs) {
2639
70
            operations.push_back({ modules.at(id), operations[0].second});
2640
70
        }
2641
200
    }
2642
200
#endif
2643
2644
200
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
200
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
535
    for (size_t i = 0; i < operations.size(); i++) {
2652
335
        auto& operation = operations[i];
2653
2654
335
        auto& module = operation.first;
2655
335
        auto& op = operation.second;
2656
2657
335
        if ( i > 0 ) {
2658
242
            auto& prevModule = operations[i-1].first;
2659
242
            auto& prevOp = operations[i].second;
2660
2661
242
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
136
                auto& curModifier = op.modifier.GetVectorPtr();
2663
136
                if ( curModifier.size() == 0 ) {
2664
33.8k
                    for (size_t j = 0; j < 512; j++) {
2665
33.7k
                        curModifier.push_back(1);
2666
33.7k
                    }
2667
70
                } else {
2668
720
                    for (auto& c : curModifier) {
2669
720
                        c++;
2670
720
                    }
2671
70
                }
2672
136
            }
2673
242
        }
2674
2675
335
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
335
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
335
        const auto& result = results.back();
2682
2683
335
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
335
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
335
        if ( options.disableTests == false ) {
2701
335
            tests::test(op, result.second);
2702
335
        }
2703
2704
335
        postprocess(module, op, result);
2705
335
    }
2706
2707
200
    if ( options.noCompare == false ) {
2708
93
        compare(operations, results, data, size);
2709
93
    }
2710
200
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.32k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.32k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.32k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
7.17k
    do {
2596
7.17k
        auto op = getOp(&parentDs, data, size);
2597
7.17k
        auto module = getModule(parentDs);
2598
7.17k
        if ( module == nullptr ) {
2599
4.79k
            continue;
2600
4.79k
        }
2601
2602
2.38k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
2.38k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
90
            break;
2607
90
        }
2608
7.08k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.32k
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.31k
#if 1
2616
1.31k
    {
2617
1.31k
        std::set<uint64_t> moduleIDs;
2618
2.38k
        for (const auto& m : modules ) {
2619
2.38k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.38k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.38k
            moduleIDs.insert(moduleID);
2627
2.38k
        }
2628
2629
1.31k
        std::set<uint64_t> operationModuleIDs;
2630
2.23k
        for (const auto& op : operations) {
2631
2.23k
            operationModuleIDs.insert(op.first->ID);
2632
2.23k
        }
2633
2634
1.31k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.31k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.31k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.31k
        for (const auto& id : addModuleIDs) {
2639
1.16k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.16k
        }
2641
1.31k
    }
2642
1.31k
#endif
2643
2644
1.31k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.31k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.71k
    for (size_t i = 0; i < operations.size(); i++) {
2652
3.40k
        auto& operation = operations[i];
2653
2654
3.40k
        auto& module = operation.first;
2655
3.40k
        auto& op = operation.second;
2656
2657
3.40k
        if ( i > 0 ) {
2658
2.21k
            auto& prevModule = operations[i-1].first;
2659
2.21k
            auto& prevOp = operations[i].second;
2660
2661
2.21k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
1.00k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
1.00k
                if ( curModifier.size() == 0 ) {
2664
326k
                    for (size_t j = 0; j < 512; j++) {
2665
325k
                        curModifier.push_back(1);
2666
325k
                    }
2667
636
                } else {
2668
29.3k
                    for (auto& c : curModifier) {
2669
29.3k
                        c++;
2670
29.3k
                    }
2671
367
                }
2672
1.00k
            }
2673
2.21k
        }
2674
2675
3.40k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
3.40k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
3.40k
        const auto& result = results.back();
2682
2683
3.40k
        if ( result.second != std::nullopt ) {
2684
1.58k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.58k
        }
2691
2692
3.40k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
3.40k
        if ( options.disableTests == false ) {
2701
3.40k
            tests::test(op, result.second);
2702
3.40k
        }
2703
2704
3.40k
        postprocess(module, op, result);
2705
3.40k
    }
2706
2707
1.31k
    if ( options.noCompare == false ) {
2708
1.19k
        compare(operations, results, data, size);
2709
1.19k
    }
2710
1.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
418
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
418
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
418
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.38k
    do {
2596
5.38k
        auto op = getOp(&parentDs, data, size);
2597
5.38k
        auto module = getModule(parentDs);
2598
5.38k
        if ( module == nullptr ) {
2599
4.55k
            continue;
2600
4.55k
        }
2601
2602
831
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
831
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
32
            break;
2607
32
        }
2608
5.35k
    } while ( parentDs.Get<bool>() == true );
2609
2610
418
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
403
#if 1
2616
403
    {
2617
403
        std::set<uint64_t> moduleIDs;
2618
598
        for (const auto& m : modules ) {
2619
598
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
598
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
598
            moduleIDs.insert(moduleID);
2627
598
        }
2628
2629
403
        std::set<uint64_t> operationModuleIDs;
2630
691
        for (const auto& op : operations) {
2631
691
            operationModuleIDs.insert(op.first->ID);
2632
691
        }
2633
2634
403
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
403
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
403
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
403
        for (const auto& id : addModuleIDs) {
2639
277
            operations.push_back({ modules.at(id), operations[0].second});
2640
277
        }
2641
403
    }
2642
403
#endif
2643
2644
403
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
403
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.37k
    for (size_t i = 0; i < operations.size(); i++) {
2652
968
        auto& operation = operations[i];
2653
2654
968
        auto& module = operation.first;
2655
968
        auto& op = operation.second;
2656
2657
968
        if ( i > 0 ) {
2658
669
            auto& prevModule = operations[i-1].first;
2659
669
            auto& prevOp = operations[i].second;
2660
2661
669
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
356
                auto& curModifier = op.modifier.GetVectorPtr();
2663
356
                if ( curModifier.size() == 0 ) {
2664
59.5k
                    for (size_t j = 0; j < 512; j++) {
2665
59.3k
                        curModifier.push_back(1);
2666
59.3k
                    }
2667
240
                } else {
2668
21.3k
                    for (auto& c : curModifier) {
2669
21.3k
                        c++;
2670
21.3k
                    }
2671
240
                }
2672
356
            }
2673
669
        }
2674
2675
968
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
968
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
968
        const auto& result = results.back();
2682
2683
968
        if ( result.second != std::nullopt ) {
2684
133
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
133
        }
2691
2692
968
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
968
        if ( options.disableTests == false ) {
2701
968
            tests::test(op, result.second);
2702
968
        }
2703
2704
968
        postprocess(module, op, result);
2705
968
    }
2706
2707
403
    if ( options.noCompare == false ) {
2708
299
        compare(operations, results, data, size);
2709
299
    }
2710
403
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
223
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
223
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
223
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.94k
    do {
2596
4.94k
        auto op = getOp(&parentDs, data, size);
2597
4.94k
        auto module = getModule(parentDs);
2598
4.94k
        if ( module == nullptr ) {
2599
4.54k
            continue;
2600
4.54k
        }
2601
2602
396
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
396
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.93k
    } while ( parentDs.Get<bool>() == true );
2609
2610
223
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
199
#if 1
2616
199
    {
2617
199
        std::set<uint64_t> moduleIDs;
2618
199
        for (const auto& m : modules ) {
2619
174
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
174
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
174
            moduleIDs.insert(moduleID);
2627
174
        }
2628
2629
199
        std::set<uint64_t> operationModuleIDs;
2630
243
        for (const auto& op : operations) {
2631
243
            operationModuleIDs.insert(op.first->ID);
2632
243
        }
2633
2634
199
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
199
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
199
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
199
        for (const auto& id : addModuleIDs) {
2639
64
            operations.push_back({ modules.at(id), operations[0].second});
2640
64
        }
2641
199
    }
2642
199
#endif
2643
2644
199
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
199
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
506
    for (size_t i = 0; i < operations.size(); i++) {
2652
307
        auto& operation = operations[i];
2653
2654
307
        auto& module = operation.first;
2655
307
        auto& op = operation.second;
2656
2657
307
        if ( i > 0 ) {
2658
220
            auto& prevModule = operations[i-1].first;
2659
220
            auto& prevOp = operations[i].second;
2660
2661
220
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
120
                auto& curModifier = op.modifier.GetVectorPtr();
2663
120
                if ( curModifier.size() == 0 ) {
2664
23.5k
                    for (size_t j = 0; j < 512; j++) {
2665
23.5k
                        curModifier.push_back(1);
2666
23.5k
                    }
2667
74
                } else {
2668
629
                    for (auto& c : curModifier) {
2669
629
                        c++;
2670
629
                    }
2671
74
                }
2672
120
            }
2673
220
        }
2674
2675
307
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
307
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
307
        const auto& result = results.back();
2682
2683
307
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
307
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
307
        if ( options.disableTests == false ) {
2701
307
            tests::test(op, result.second);
2702
307
        }
2703
2704
307
        postprocess(module, op, result);
2705
307
    }
2706
2707
199
    if ( options.noCompare == false ) {
2708
87
        compare(operations, results, data, size);
2709
87
    }
2710
199
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
199
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
199
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
199
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.49k
    do {
2596
5.49k
        auto op = getOp(&parentDs, data, size);
2597
5.49k
        auto module = getModule(parentDs);
2598
5.49k
        if ( module == nullptr ) {
2599
5.11k
            continue;
2600
5.11k
        }
2601
2602
381
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
381
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
18
            break;
2607
18
        }
2608
5.47k
    } while ( parentDs.Get<bool>() == true );
2609
2610
199
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
183
#if 1
2616
183
    {
2617
183
        std::set<uint64_t> moduleIDs;
2618
183
        for (const auto& m : modules ) {
2619
158
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
158
            moduleIDs.insert(moduleID);
2627
158
        }
2628
2629
183
        std::set<uint64_t> operationModuleIDs;
2630
238
        for (const auto& op : operations) {
2631
238
            operationModuleIDs.insert(op.first->ID);
2632
238
        }
2633
2634
183
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
183
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
183
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
183
        for (const auto& id : addModuleIDs) {
2639
54
            operations.push_back({ modules.at(id), operations[0].second});
2640
54
        }
2641
183
    }
2642
183
#endif
2643
2644
183
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
183
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
475
    for (size_t i = 0; i < operations.size(); i++) {
2652
292
        auto& operation = operations[i];
2653
2654
292
        auto& module = operation.first;
2655
292
        auto& op = operation.second;
2656
2657
292
        if ( i > 0 ) {
2658
213
            auto& prevModule = operations[i-1].first;
2659
213
            auto& prevOp = operations[i].second;
2660
2661
213
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
118
                auto& curModifier = op.modifier.GetVectorPtr();
2663
118
                if ( curModifier.size() == 0 ) {
2664
30.7k
                    for (size_t j = 0; j < 512; j++) {
2665
30.7k
                        curModifier.push_back(1);
2666
30.7k
                    }
2667
60
                } else {
2668
915
                    for (auto& c : curModifier) {
2669
915
                        c++;
2670
915
                    }
2671
58
                }
2672
118
            }
2673
213
        }
2674
2675
292
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
292
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
292
        const auto& result = results.back();
2682
2683
292
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
292
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
292
        if ( options.disableTests == false ) {
2701
292
            tests::test(op, result.second);
2702
292
        }
2703
2704
292
        postprocess(module, op, result);
2705
292
    }
2706
2707
183
    if ( options.noCompare == false ) {
2708
79
        compare(operations, results, data, size);
2709
79
    }
2710
183
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.51k
    do {
2596
5.51k
        auto op = getOp(&parentDs, data, size);
2597
5.51k
        auto module = getModule(parentDs);
2598
5.51k
        if ( module == nullptr ) {
2599
5.15k
            continue;
2600
5.15k
        }
2601
2602
355
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
355
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
5.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
191
    if ( operations.empty() == true ) {
2611
14
        return;
2612
14
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
177
#if 1
2616
177
    {
2617
177
        std::set<uint64_t> moduleIDs;
2618
177
        for (const auto& m : modules ) {
2619
136
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
136
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
136
            moduleIDs.insert(moduleID);
2627
136
        }
2628
2629
177
        std::set<uint64_t> operationModuleIDs;
2630
209
        for (const auto& op : operations) {
2631
209
            operationModuleIDs.insert(op.first->ID);
2632
209
        }
2633
2634
177
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
177
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
177
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
177
        for (const auto& id : addModuleIDs) {
2639
48
            operations.push_back({ modules.at(id), operations[0].second});
2640
48
        }
2641
177
    }
2642
177
#endif
2643
2644
177
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
177
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
434
    for (size_t i = 0; i < operations.size(); i++) {
2652
257
        auto& operation = operations[i];
2653
2654
257
        auto& module = operation.first;
2655
257
        auto& op = operation.second;
2656
2657
257
        if ( i > 0 ) {
2658
189
            auto& prevModule = operations[i-1].first;
2659
189
            auto& prevOp = operations[i].second;
2660
2661
189
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
105
                auto& curModifier = op.modifier.GetVectorPtr();
2663
105
                if ( curModifier.size() == 0 ) {
2664
21.5k
                    for (size_t j = 0; j < 512; j++) {
2665
21.5k
                        curModifier.push_back(1);
2666
21.5k
                    }
2667
63
                } else {
2668
887
                    for (auto& c : curModifier) {
2669
887
                        c++;
2670
887
                    }
2671
63
                }
2672
105
            }
2673
189
        }
2674
2675
257
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
257
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
257
        const auto& result = results.back();
2682
2683
257
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
257
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
257
        if ( options.disableTests == false ) {
2701
257
            tests::test(op, result.second);
2702
257
        }
2703
2704
257
        postprocess(module, op, result);
2705
257
    }
2706
2707
177
    if ( options.noCompare == false ) {
2708
68
        compare(operations, results, data, size);
2709
68
    }
2710
177
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
742
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
742
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
742
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.67k
    do {
2596
4.67k
        auto op = getOp(&parentDs, data, size);
2597
4.67k
        auto module = getModule(parentDs);
2598
4.67k
        if ( module == nullptr ) {
2599
3.41k
            continue;
2600
3.41k
        }
2601
2602
1.26k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.26k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
27
            break;
2607
27
        }
2608
4.64k
    } while ( parentDs.Get<bool>() == true );
2609
2610
742
    if ( operations.empty() == true ) {
2611
60
        return;
2612
60
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
682
#if 1
2616
682
    {
2617
682
        std::set<uint64_t> moduleIDs;
2618
1.09k
        for (const auto& m : modules ) {
2619
1.09k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
1.09k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
1.09k
            moduleIDs.insert(moduleID);
2627
1.09k
        }
2628
2629
682
        std::set<uint64_t> operationModuleIDs;
2630
1.12k
        for (const auto& op : operations) {
2631
1.12k
            operationModuleIDs.insert(op.first->ID);
2632
1.12k
        }
2633
2634
682
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
682
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
682
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
682
        for (const auto& id : addModuleIDs) {
2639
522
            operations.push_back({ modules.at(id), operations[0].second});
2640
522
        }
2641
682
    }
2642
682
#endif
2643
2644
682
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
682
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
2.32k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.64k
        auto& operation = operations[i];
2653
2654
1.64k
        auto& module = operation.first;
2655
1.64k
        auto& op = operation.second;
2656
2657
1.64k
        if ( i > 0 ) {
2658
1.09k
            auto& prevModule = operations[i-1].first;
2659
1.09k
            auto& prevOp = operations[i].second;
2660
2661
1.09k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
523
                auto& curModifier = op.modifier.GetVectorPtr();
2663
523
                if ( curModifier.size() == 0 ) {
2664
177k
                    for (size_t j = 0; j < 512; j++) {
2665
177k
                        curModifier.push_back(1);
2666
177k
                    }
2667
346
                } else {
2668
1.07k
                    for (auto& c : curModifier) {
2669
1.07k
                        c++;
2670
1.07k
                    }
2671
177
                }
2672
523
            }
2673
1.09k
        }
2674
2675
1.64k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.64k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.64k
        const auto& result = results.back();
2682
2683
1.64k
        if ( result.second != std::nullopt ) {
2684
888
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
888
        }
2691
2692
1.64k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.64k
        if ( options.disableTests == false ) {
2701
1.64k
            tests::test(op, result.second);
2702
1.64k
        }
2703
2704
1.64k
        postprocess(module, op, result);
2705
1.64k
    }
2706
2707
682
    if ( options.noCompare == false ) {
2708
549
        compare(operations, results, data, size);
2709
549
    }
2710
682
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
365
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
365
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
365
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.61k
    do {
2596
4.61k
        auto op = getOp(&parentDs, data, size);
2597
4.61k
        auto module = getModule(parentDs);
2598
4.61k
        if ( module == nullptr ) {
2599
3.95k
            continue;
2600
3.95k
        }
2601
2602
664
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
664
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
19
            break;
2607
19
        }
2608
4.59k
    } while ( parentDs.Get<bool>() == true );
2609
2610
365
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
338
#if 1
2616
338
    {
2617
338
        std::set<uint64_t> moduleIDs;
2618
470
        for (const auto& m : modules ) {
2619
470
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
470
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
470
            moduleIDs.insert(moduleID);
2627
470
        }
2628
2629
338
        std::set<uint64_t> operationModuleIDs;
2630
550
        for (const auto& op : operations) {
2631
550
            operationModuleIDs.insert(op.first->ID);
2632
550
        }
2633
2634
338
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
338
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
338
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
338
        for (const auto& id : addModuleIDs) {
2639
210
            operations.push_back({ modules.at(id), operations[0].second});
2640
210
        }
2641
338
    }
2642
338
#endif
2643
2644
338
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
338
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.09k
    for (size_t i = 0; i < operations.size(); i++) {
2652
760
        auto& operation = operations[i];
2653
2654
760
        auto& module = operation.first;
2655
760
        auto& op = operation.second;
2656
2657
760
        if ( i > 0 ) {
2658
525
            auto& prevModule = operations[i-1].first;
2659
525
            auto& prevOp = operations[i].second;
2660
2661
525
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
281
                auto& curModifier = op.modifier.GetVectorPtr();
2663
281
                if ( curModifier.size() == 0 ) {
2664
77.9k
                    for (size_t j = 0; j < 512; j++) {
2665
77.8k
                        curModifier.push_back(1);
2666
77.8k
                    }
2667
152
                } else {
2668
720
                    for (auto& c : curModifier) {
2669
720
                        c++;
2670
720
                    }
2671
129
                }
2672
281
            }
2673
525
        }
2674
2675
760
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
760
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
760
        const auto& result = results.back();
2682
2683
760
        if ( result.second != std::nullopt ) {
2684
273
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
273
        }
2691
2692
760
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
760
        if ( options.disableTests == false ) {
2701
760
            tests::test(op, result.second);
2702
760
        }
2703
2704
760
        postprocess(module, op, result);
2705
760
    }
2706
2707
338
    if ( options.noCompare == false ) {
2708
235
        compare(operations, results, data, size);
2709
235
    }
2710
338
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
177
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
177
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
177
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.83k
    do {
2596
3.83k
        auto op = getOp(&parentDs, data, size);
2597
3.83k
        auto module = getModule(parentDs);
2598
3.83k
        if ( module == nullptr ) {
2599
3.52k
            continue;
2600
3.52k
        }
2601
2602
310
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
310
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
3.81k
    } while ( parentDs.Get<bool>() == true );
2609
2610
177
    if ( operations.empty() == true ) {
2611
20
        return;
2612
20
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
157
#if 1
2616
157
    {
2617
157
        std::set<uint64_t> moduleIDs;
2618
157
        for (const auto& m : modules ) {
2619
118
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
118
            moduleIDs.insert(moduleID);
2627
118
        }
2628
2629
157
        std::set<uint64_t> operationModuleIDs;
2630
182
        for (const auto& op : operations) {
2631
182
            operationModuleIDs.insert(op.first->ID);
2632
182
        }
2633
2634
157
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
157
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
157
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
157
        for (const auto& id : addModuleIDs) {
2639
38
            operations.push_back({ modules.at(id), operations[0].second});
2640
38
        }
2641
157
    }
2642
157
#endif
2643
2644
157
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
157
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
377
    for (size_t i = 0; i < operations.size(); i++) {
2652
220
        auto& operation = operations[i];
2653
2654
220
        auto& module = operation.first;
2655
220
        auto& op = operation.second;
2656
2657
220
        if ( i > 0 ) {
2658
161
            auto& prevModule = operations[i-1].first;
2659
161
            auto& prevOp = operations[i].second;
2660
2661
161
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
87
                auto& curModifier = op.modifier.GetVectorPtr();
2663
87
                if ( curModifier.size() == 0 ) {
2664
22.5k
                    for (size_t j = 0; j < 512; j++) {
2665
22.5k
                        curModifier.push_back(1);
2666
22.5k
                    }
2667
44
                } else {
2668
455
                    for (auto& c : curModifier) {
2669
455
                        c++;
2670
455
                    }
2671
43
                }
2672
87
            }
2673
161
        }
2674
2675
220
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
220
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
220
        const auto& result = results.back();
2682
2683
220
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
220
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
220
        if ( options.disableTests == false ) {
2701
220
            tests::test(op, result.second);
2702
220
        }
2703
2704
220
        postprocess(module, op, result);
2705
220
    }
2706
2707
157
    if ( options.noCompare == false ) {
2708
59
        compare(operations, results, data, size);
2709
59
    }
2710
157
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
184
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
184
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
184
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.77k
    do {
2596
4.77k
        auto op = getOp(&parentDs, data, size);
2597
4.77k
        auto module = getModule(parentDs);
2598
4.77k
        if ( module == nullptr ) {
2599
4.43k
            continue;
2600
4.43k
        }
2601
2602
340
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
340
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.76k
    } while ( parentDs.Get<bool>() == true );
2609
2610
184
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
167
#if 1
2616
167
    {
2617
167
        std::set<uint64_t> moduleIDs;
2618
167
        for (const auto& m : modules ) {
2619
132
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
132
            moduleIDs.insert(moduleID);
2627
132
        }
2628
2629
167
        std::set<uint64_t> operationModuleIDs;
2630
207
        for (const auto& op : operations) {
2631
207
            operationModuleIDs.insert(op.first->ID);
2632
207
        }
2633
2634
167
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
167
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
167
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
167
        for (const auto& id : addModuleIDs) {
2639
44
            operations.push_back({ modules.at(id), operations[0].second});
2640
44
        }
2641
167
    }
2642
167
#endif
2643
2644
167
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
167
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
418
    for (size_t i = 0; i < operations.size(); i++) {
2652
251
        auto& operation = operations[i];
2653
2654
251
        auto& module = operation.first;
2655
251
        auto& op = operation.second;
2656
2657
251
        if ( i > 0 ) {
2658
185
            auto& prevModule = operations[i-1].first;
2659
185
            auto& prevOp = operations[i].second;
2660
2661
185
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
105
                auto& curModifier = op.modifier.GetVectorPtr();
2663
105
                if ( curModifier.size() == 0 ) {
2664
27.7k
                    for (size_t j = 0; j < 512; j++) {
2665
27.6k
                        curModifier.push_back(1);
2666
27.6k
                    }
2667
54
                } else {
2668
661
                    for (auto& c : curModifier) {
2669
661
                        c++;
2670
661
                    }
2671
51
                }
2672
105
            }
2673
185
        }
2674
2675
251
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
251
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
251
        const auto& result = results.back();
2682
2683
251
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
251
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
251
        if ( options.disableTests == false ) {
2701
251
            tests::test(op, result.second);
2702
251
        }
2703
2704
251
        postprocess(module, op, result);
2705
251
    }
2706
2707
167
    if ( options.noCompare == false ) {
2708
66
        compare(operations, results, data, size);
2709
66
    }
2710
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.14k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.14k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.14k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
6.01k
    do {
2596
6.01k
        auto op = getOp(&parentDs, data, size);
2597
6.01k
        auto module = getModule(parentDs);
2598
6.01k
        if ( module == nullptr ) {
2599
4.23k
            continue;
2600
4.23k
        }
2601
2602
1.77k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.77k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
38
            break;
2607
38
        }
2608
5.97k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.14k
    if ( operations.empty() == true ) {
2611
32
        return;
2612
32
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.11k
#if 1
2616
1.11k
    {
2617
1.11k
        std::set<uint64_t> moduleIDs;
2618
2.00k
        for (const auto& m : modules ) {
2619
2.00k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.00k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.00k
            moduleIDs.insert(moduleID);
2627
2.00k
        }
2628
2629
1.11k
        std::set<uint64_t> operationModuleIDs;
2630
1.60k
        for (const auto& op : operations) {
2631
1.60k
            operationModuleIDs.insert(op.first->ID);
2632
1.60k
        }
2633
2634
1.11k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.11k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.11k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.11k
        for (const auto& id : addModuleIDs) {
2639
969
            operations.push_back({ modules.at(id), operations[0].second});
2640
969
        }
2641
1.11k
    }
2642
1.11k
#endif
2643
2644
1.11k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.11k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
3.68k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.57k
        auto& operation = operations[i];
2653
2654
2.57k
        auto& module = operation.first;
2655
2.57k
        auto& op = operation.second;
2656
2657
2.57k
        if ( i > 0 ) {
2658
1.57k
            auto& prevModule = operations[i-1].first;
2659
1.57k
            auto& prevOp = operations[i].second;
2660
2661
1.57k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
557
                auto& curModifier = op.modifier.GetVectorPtr();
2663
557
                if ( curModifier.size() == 0 ) {
2664
184k
                    for (size_t j = 0; j < 512; j++) {
2665
184k
                        curModifier.push_back(1);
2666
184k
                    }
2667
360
                } else {
2668
826
                    for (auto& c : curModifier) {
2669
826
                        c++;
2670
826
                    }
2671
197
                }
2672
557
            }
2673
1.57k
        }
2674
2675
2.57k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.57k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.57k
        const auto& result = results.back();
2682
2683
2.57k
        if ( result.second != std::nullopt ) {
2684
1.00k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
1.00k
        }
2691
2692
2.57k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.57k
        if ( options.disableTests == false ) {
2701
2.57k
            tests::test(op, result.second);
2702
2.57k
        }
2703
2704
2.57k
        postprocess(module, op, result);
2705
2.57k
    }
2706
2707
1.11k
    if ( options.noCompare == false ) {
2708
1.00k
        compare(operations, results, data, size);
2709
1.00k
    }
2710
1.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
240
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
240
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
240
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.54k
    do {
2596
4.54k
        auto op = getOp(&parentDs, data, size);
2597
4.54k
        auto module = getModule(parentDs);
2598
4.54k
        if ( module == nullptr ) {
2599
4.13k
            continue;
2600
4.13k
        }
2601
2602
412
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
412
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
240
    if ( operations.empty() == true ) {
2611
33
        return;
2612
33
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
207
#if 1
2616
207
    {
2617
207
        std::set<uint64_t> moduleIDs;
2618
207
        for (const auto& m : modules ) {
2619
188
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
188
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
188
            moduleIDs.insert(moduleID);
2627
188
        }
2628
2629
207
        std::set<uint64_t> operationModuleIDs;
2630
253
        for (const auto& op : operations) {
2631
253
            operationModuleIDs.insert(op.first->ID);
2632
253
        }
2633
2634
207
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
207
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
207
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
207
        for (const auto& id : addModuleIDs) {
2639
71
            operations.push_back({ modules.at(id), operations[0].second});
2640
71
        }
2641
207
    }
2642
207
#endif
2643
2644
207
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
207
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
531
    for (size_t i = 0; i < operations.size(); i++) {
2652
324
        auto& operation = operations[i];
2653
2654
324
        auto& module = operation.first;
2655
324
        auto& op = operation.second;
2656
2657
324
        if ( i > 0 ) {
2658
230
            auto& prevModule = operations[i-1].first;
2659
230
            auto& prevOp = operations[i].second;
2660
2661
230
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
125
                auto& curModifier = op.modifier.GetVectorPtr();
2663
125
                if ( curModifier.size() == 0 ) {
2664
25.6k
                    for (size_t j = 0; j < 512; j++) {
2665
25.6k
                        curModifier.push_back(1);
2666
25.6k
                    }
2667
75
                } else {
2668
977
                    for (auto& c : curModifier) {
2669
977
                        c++;
2670
977
                    }
2671
75
                }
2672
125
            }
2673
230
        }
2674
2675
324
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
324
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
324
        const auto& result = results.back();
2682
2683
324
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
324
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
324
        if ( options.disableTests == false ) {
2701
324
            tests::test(op, result.second);
2702
324
        }
2703
2704
324
        postprocess(module, op, result);
2705
324
    }
2706
2707
207
    if ( options.noCompare == false ) {
2708
94
        compare(operations, results, data, size);
2709
94
    }
2710
207
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
266
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
266
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
266
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.72k
    do {
2596
4.72k
        auto op = getOp(&parentDs, data, size);
2597
4.72k
        auto module = getModule(parentDs);
2598
4.72k
        if ( module == nullptr ) {
2599
4.31k
            continue;
2600
4.31k
        }
2601
2602
414
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
414
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
4.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
266
    if ( operations.empty() == true ) {
2611
29
        return;
2612
29
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
237
#if 1
2616
237
    {
2617
237
        std::set<uint64_t> moduleIDs;
2618
237
        for (const auto& m : modules ) {
2619
206
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
206
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
206
            moduleIDs.insert(moduleID);
2627
206
        }
2628
2629
237
        std::set<uint64_t> operationModuleIDs;
2630
278
        for (const auto& op : operations) {
2631
278
            operationModuleIDs.insert(op.first->ID);
2632
278
        }
2633
2634
237
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
237
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
237
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
237
        for (const auto& id : addModuleIDs) {
2639
82
            operations.push_back({ modules.at(id), operations[0].second});
2640
82
        }
2641
237
    }
2642
237
#endif
2643
2644
237
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
237
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
597
    for (size_t i = 0; i < operations.size(); i++) {
2652
360
        auto& operation = operations[i];
2653
2654
360
        auto& module = operation.first;
2655
360
        auto& op = operation.second;
2656
2657
360
        if ( i > 0 ) {
2658
257
            auto& prevModule = operations[i-1].first;
2659
257
            auto& prevOp = operations[i].second;
2660
2661
257
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
141
                auto& curModifier = op.modifier.GetVectorPtr();
2663
141
                if ( curModifier.size() == 0 ) {
2664
37.4k
                    for (size_t j = 0; j < 512; j++) {
2665
37.3k
                        curModifier.push_back(1);
2666
37.3k
                    }
2667
73
                } else {
2668
1.06k
                    for (auto& c : curModifier) {
2669
1.06k
                        c++;
2670
1.06k
                    }
2671
68
                }
2672
141
            }
2673
257
        }
2674
2675
360
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
360
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
360
        const auto& result = results.back();
2682
2683
360
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
360
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
360
        if ( options.disableTests == false ) {
2701
360
            tests::test(op, result.second);
2702
360
        }
2703
2704
360
        postprocess(module, op, result);
2705
360
    }
2706
2707
237
    if ( options.noCompare == false ) {
2708
103
        compare(operations, results, data, size);
2709
103
    }
2710
237
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
332
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
332
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
332
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.30k
    do {
2596
3.30k
        auto op = getOp(&parentDs, data, size);
2597
3.30k
        auto module = getModule(parentDs);
2598
3.30k
        if ( module == nullptr ) {
2599
2.96k
            continue;
2600
2.96k
        }
2601
2602
343
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
343
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
3.29k
    } while ( parentDs.Get<bool>() == true );
2609
2610
332
    if ( operations.empty() == true ) {
2611
37
        return;
2612
37
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
295
#if 1
2616
295
    {
2617
295
        std::set<uint64_t> moduleIDs;
2618
295
        for (const auto& m : modules ) {
2619
132
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
132
            moduleIDs.insert(moduleID);
2627
132
        }
2628
2629
295
        std::set<uint64_t> operationModuleIDs;
2630
295
        for (const auto& op : operations) {
2631
194
            operationModuleIDs.insert(op.first->ID);
2632
194
        }
2633
2634
295
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
295
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
295
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
295
        for (const auto& id : addModuleIDs) {
2639
44
            operations.push_back({ modules.at(id), operations[0].second});
2640
44
        }
2641
295
    }
2642
295
#endif
2643
2644
295
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
295
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
533
    for (size_t i = 0; i < operations.size(); i++) {
2652
238
        auto& operation = operations[i];
2653
2654
238
        auto& module = operation.first;
2655
238
        auto& op = operation.second;
2656
2657
238
        if ( i > 0 ) {
2658
172
            auto& prevModule = operations[i-1].first;
2659
172
            auto& prevOp = operations[i].second;
2660
2661
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
93
                auto& curModifier = op.modifier.GetVectorPtr();
2663
93
                if ( curModifier.size() == 0 ) {
2664
20.5k
                    for (size_t j = 0; j < 512; j++) {
2665
20.4k
                        curModifier.push_back(1);
2666
20.4k
                    }
2667
53
                } else {
2668
490
                    for (auto& c : curModifier) {
2669
490
                        c++;
2670
490
                    }
2671
53
                }
2672
93
            }
2673
172
        }
2674
2675
238
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
238
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
238
        const auto& result = results.back();
2682
2683
238
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
238
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
238
        if ( options.disableTests == false ) {
2701
238
            tests::test(op, result.second);
2702
238
        }
2703
2704
238
        postprocess(module, op, result);
2705
238
    }
2706
2707
295
    if ( options.noCompare == false ) {
2708
66
        compare(operations, results, data, size);
2709
66
    }
2710
295
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
269
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
269
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
269
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.92k
    do {
2596
4.92k
        auto op = getOp(&parentDs, data, size);
2597
4.92k
        auto module = getModule(parentDs);
2598
4.92k
        if ( module == nullptr ) {
2599
4.55k
            continue;
2600
4.55k
        }
2601
2602
369
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
369
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.90k
    } while ( parentDs.Get<bool>() == true );
2609
2610
269
    if ( operations.empty() == true ) {
2611
39
        return;
2612
39
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
230
#if 1
2616
230
    {
2617
230
        std::set<uint64_t> moduleIDs;
2618
230
        for (const auto& m : modules ) {
2619
126
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
126
            moduleIDs.insert(moduleID);
2627
126
        }
2628
2629
230
        std::set<uint64_t> operationModuleIDs;
2630
230
        for (const auto& op : operations) {
2631
192
            operationModuleIDs.insert(op.first->ID);
2632
192
        }
2633
2634
230
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
230
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
230
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
230
        for (const auto& id : addModuleIDs) {
2639
43
            operations.push_back({ modules.at(id), operations[0].second});
2640
43
        }
2641
230
    }
2642
230
#endif
2643
2644
230
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
230
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
465
    for (size_t i = 0; i < operations.size(); i++) {
2652
235
        auto& operation = operations[i];
2653
2654
235
        auto& module = operation.first;
2655
235
        auto& op = operation.second;
2656
2657
235
        if ( i > 0 ) {
2658
172
            auto& prevModule = operations[i-1].first;
2659
172
            auto& prevOp = operations[i].second;
2660
2661
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
95
                auto& curModifier = op.modifier.GetVectorPtr();
2663
95
                if ( curModifier.size() == 0 ) {
2664
14.3k
                    for (size_t j = 0; j < 512; j++) {
2665
14.3k
                        curModifier.push_back(1);
2666
14.3k
                    }
2667
67
                } else {
2668
988
                    for (auto& c : curModifier) {
2669
988
                        c++;
2670
988
                    }
2671
67
                }
2672
95
            }
2673
172
        }
2674
2675
235
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
235
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
235
        const auto& result = results.back();
2682
2683
235
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
235
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
235
        if ( options.disableTests == false ) {
2701
235
            tests::test(op, result.second);
2702
235
        }
2703
2704
235
        postprocess(module, op, result);
2705
235
    }
2706
2707
230
    if ( options.noCompare == false ) {
2708
63
        compare(operations, results, data, size);
2709
63
    }
2710
230
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
332
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
332
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
332
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.07k
    do {
2596
5.07k
        auto op = getOp(&parentDs, data, size);
2597
5.07k
        auto module = getModule(parentDs);
2598
5.07k
        if ( module == nullptr ) {
2599
4.65k
            continue;
2600
4.65k
        }
2601
2602
427
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
427
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
16
            break;
2607
16
        }
2608
5.06k
    } while ( parentDs.Get<bool>() == true );
2609
2610
332
    if ( operations.empty() == true ) {
2611
56
        return;
2612
56
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
276
#if 1
2616
276
    {
2617
276
        std::set<uint64_t> moduleIDs;
2618
276
        for (const auto& m : modules ) {
2619
198
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
198
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
198
            moduleIDs.insert(moduleID);
2627
198
        }
2628
2629
276
        std::set<uint64_t> operationModuleIDs;
2630
276
        for (const auto& op : operations) {
2631
243
            operationModuleIDs.insert(op.first->ID);
2632
243
        }
2633
2634
276
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
276
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
276
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
276
        for (const auto& id : addModuleIDs) {
2639
79
            operations.push_back({ modules.at(id), operations[0].second});
2640
79
        }
2641
276
    }
2642
276
#endif
2643
2644
276
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
276
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
598
    for (size_t i = 0; i < operations.size(); i++) {
2652
322
        auto& operation = operations[i];
2653
2654
322
        auto& module = operation.first;
2655
322
        auto& op = operation.second;
2656
2657
322
        if ( i > 0 ) {
2658
223
            auto& prevModule = operations[i-1].first;
2659
223
            auto& prevOp = operations[i].second;
2660
2661
223
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
106
                auto& curModifier = op.modifier.GetVectorPtr();
2663
106
                if ( curModifier.size() == 0 ) {
2664
24.6k
                    for (size_t j = 0; j < 512; j++) {
2665
24.5k
                        curModifier.push_back(1);
2666
24.5k
                    }
2667
58
                } else {
2668
574
                    for (auto& c : curModifier) {
2669
574
                        c++;
2670
574
                    }
2671
58
                }
2672
106
            }
2673
223
        }
2674
2675
322
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
322
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
322
        const auto& result = results.back();
2682
2683
322
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
322
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
322
        if ( options.disableTests == false ) {
2701
322
            tests::test(op, result.second);
2702
322
        }
2703
2704
322
        postprocess(module, op, result);
2705
322
    }
2706
2707
276
    if ( options.noCompare == false ) {
2708
99
        compare(operations, results, data, size);
2709
99
    }
2710
276
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
314
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
314
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
314
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.10k
    do {
2596
4.10k
        auto op = getOp(&parentDs, data, size);
2597
4.10k
        auto module = getModule(parentDs);
2598
4.10k
        if ( module == nullptr ) {
2599
3.71k
            continue;
2600
3.71k
        }
2601
2602
393
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
393
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.09k
    } while ( parentDs.Get<bool>() == true );
2609
2610
314
    if ( operations.empty() == true ) {
2611
53
        return;
2612
53
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
261
#if 1
2616
261
    {
2617
261
        std::set<uint64_t> moduleIDs;
2618
261
        for (const auto& m : modules ) {
2619
146
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
146
            moduleIDs.insert(moduleID);
2627
146
        }
2628
2629
261
        std::set<uint64_t> operationModuleIDs;
2630
261
        for (const auto& op : operations) {
2631
216
            operationModuleIDs.insert(op.first->ID);
2632
216
        }
2633
2634
261
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
261
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
261
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
261
        for (const auto& id : addModuleIDs) {
2639
50
            operations.push_back({ modules.at(id), operations[0].second});
2640
50
        }
2641
261
    }
2642
261
#endif
2643
2644
261
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
261
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
527
    for (size_t i = 0; i < operations.size(); i++) {
2652
266
        auto& operation = operations[i];
2653
2654
266
        auto& module = operation.first;
2655
266
        auto& op = operation.second;
2656
2657
266
        if ( i > 0 ) {
2658
193
            auto& prevModule = operations[i-1].first;
2659
193
            auto& prevOp = operations[i].second;
2660
2661
193
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
102
                auto& curModifier = op.modifier.GetVectorPtr();
2663
102
                if ( curModifier.size() == 0 ) {
2664
24.6k
                    for (size_t j = 0; j < 512; j++) {
2665
24.5k
                        curModifier.push_back(1);
2666
24.5k
                    }
2667
54
                } else {
2668
921
                    for (auto& c : curModifier) {
2669
921
                        c++;
2670
921
                    }
2671
54
                }
2672
102
            }
2673
193
        }
2674
2675
266
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
266
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
266
        const auto& result = results.back();
2682
2683
266
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
266
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
266
        if ( options.disableTests == false ) {
2701
266
            tests::test(op, result.second);
2702
266
        }
2703
2704
266
        postprocess(module, op, result);
2705
266
    }
2706
2707
261
    if ( options.noCompare == false ) {
2708
73
        compare(operations, results, data, size);
2709
73
    }
2710
261
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.27k
    do {
2596
5.27k
        auto op = getOp(&parentDs, data, size);
2597
5.27k
        auto module = getModule(parentDs);
2598
5.27k
        if ( module == nullptr ) {
2599
4.91k
            continue;
2600
4.91k
        }
2601
2602
360
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
360
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
5.26k
    } while ( parentDs.Get<bool>() == true );
2609
2610
219
    if ( operations.empty() == true ) {
2611
15
        return;
2612
15
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
204
#if 1
2616
204
    {
2617
204
        std::set<uint64_t> moduleIDs;
2618
204
        for (const auto& m : modules ) {
2619
120
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
120
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
120
            moduleIDs.insert(moduleID);
2627
120
        }
2628
2629
204
        std::set<uint64_t> operationModuleIDs;
2630
204
        for (const auto& op : operations) {
2631
178
            operationModuleIDs.insert(op.first->ID);
2632
178
        }
2633
2634
204
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
204
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
204
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
204
        for (const auto& id : addModuleIDs) {
2639
40
            operations.push_back({ modules.at(id), operations[0].second});
2640
40
        }
2641
204
    }
2642
204
#endif
2643
2644
204
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
204
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
422
    for (size_t i = 0; i < operations.size(); i++) {
2652
218
        auto& operation = operations[i];
2653
2654
218
        auto& module = operation.first;
2655
218
        auto& op = operation.second;
2656
2657
218
        if ( i > 0 ) {
2658
158
            auto& prevModule = operations[i-1].first;
2659
158
            auto& prevOp = operations[i].second;
2660
2661
158
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
79
                auto& curModifier = op.modifier.GetVectorPtr();
2663
79
                if ( curModifier.size() == 0 ) {
2664
16.4k
                    for (size_t j = 0; j < 512; j++) {
2665
16.3k
                        curModifier.push_back(1);
2666
16.3k
                    }
2667
47
                } else {
2668
1.40k
                    for (auto& c : curModifier) {
2669
1.40k
                        c++;
2670
1.40k
                    }
2671
47
                }
2672
79
            }
2673
158
        }
2674
2675
218
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
218
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
218
        const auto& result = results.back();
2682
2683
218
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
218
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
218
        if ( options.disableTests == false ) {
2701
218
            tests::test(op, result.second);
2702
218
        }
2703
2704
218
        postprocess(module, op, result);
2705
218
    }
2706
2707
204
    if ( options.noCompare == false ) {
2708
60
        compare(operations, results, data, size);
2709
60
    }
2710
204
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.28k
    do {
2596
5.28k
        auto op = getOp(&parentDs, data, size);
2597
5.28k
        auto module = getModule(parentDs);
2598
5.28k
        if ( module == nullptr ) {
2599
4.88k
            continue;
2600
4.88k
        }
2601
2602
403
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
403
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
5.27k
    } while ( parentDs.Get<bool>() == true );
2609
2610
219
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
198
#if 1
2616
198
    {
2617
198
        std::set<uint64_t> moduleIDs;
2618
198
        for (const auto& m : modules ) {
2619
148
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
148
            moduleIDs.insert(moduleID);
2627
148
        }
2628
2629
198
        std::set<uint64_t> operationModuleIDs;
2630
218
        for (const auto& op : operations) {
2631
218
            operationModuleIDs.insert(op.first->ID);
2632
218
        }
2633
2634
198
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
198
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
198
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
198
        for (const auto& id : addModuleIDs) {
2639
53
            operations.push_back({ modules.at(id), operations[0].second});
2640
53
        }
2641
198
    }
2642
198
#endif
2643
2644
198
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
198
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
469
    for (size_t i = 0; i < operations.size(); i++) {
2652
271
        auto& operation = operations[i];
2653
2654
271
        auto& module = operation.first;
2655
271
        auto& op = operation.second;
2656
2657
271
        if ( i > 0 ) {
2658
197
            auto& prevModule = operations[i-1].first;
2659
197
            auto& prevOp = operations[i].second;
2660
2661
197
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
109
                auto& curModifier = op.modifier.GetVectorPtr();
2663
109
                if ( curModifier.size() == 0 ) {
2664
23.0k
                    for (size_t j = 0; j < 512; j++) {
2665
23.0k
                        curModifier.push_back(1);
2666
23.0k
                    }
2667
64
                } else {
2668
771
                    for (auto& c : curModifier) {
2669
771
                        c++;
2670
771
                    }
2671
64
                }
2672
109
            }
2673
197
        }
2674
2675
271
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
271
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
271
        const auto& result = results.back();
2682
2683
271
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
271
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
271
        if ( options.disableTests == false ) {
2701
271
            tests::test(op, result.second);
2702
271
        }
2703
2704
271
        postprocess(module, op, result);
2705
271
    }
2706
2707
198
    if ( options.noCompare == false ) {
2708
74
        compare(operations, results, data, size);
2709
74
    }
2710
198
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
318
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
318
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
318
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.00k
    do {
2596
4.00k
        auto op = getOp(&parentDs, data, size);
2597
4.00k
        auto module = getModule(parentDs);
2598
4.00k
        if ( module == nullptr ) {
2599
3.47k
            continue;
2600
3.47k
        }
2601
2602
529
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
529
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
3.98k
    } while ( parentDs.Get<bool>() == true );
2609
2610
318
    if ( operations.empty() == true ) {
2611
32
        return;
2612
32
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
286
#if 1
2616
286
    {
2617
286
        std::set<uint64_t> moduleIDs;
2618
288
        for (const auto& m : modules ) {
2619
288
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
288
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
288
            moduleIDs.insert(moduleID);
2627
288
        }
2628
2629
286
        std::set<uint64_t> operationModuleIDs;
2630
380
        for (const auto& op : operations) {
2631
380
            operationModuleIDs.insert(op.first->ID);
2632
380
        }
2633
2634
286
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
286
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
286
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
286
        for (const auto& id : addModuleIDs) {
2639
124
            operations.push_back({ modules.at(id), operations[0].second});
2640
124
        }
2641
286
    }
2642
286
#endif
2643
2644
286
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
286
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
790
    for (size_t i = 0; i < operations.size(); i++) {
2652
504
        auto& operation = operations[i];
2653
2654
504
        auto& module = operation.first;
2655
504
        auto& op = operation.second;
2656
2657
504
        if ( i > 0 ) {
2658
360
            auto& prevModule = operations[i-1].first;
2659
360
            auto& prevOp = operations[i].second;
2660
2661
360
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
203
                auto& curModifier = op.modifier.GetVectorPtr();
2663
203
                if ( curModifier.size() == 0 ) {
2664
63.0k
                    for (size_t j = 0; j < 512; j++) {
2665
62.9k
                        curModifier.push_back(1);
2666
62.9k
                    }
2667
123
                } else {
2668
659
                    for (auto& c : curModifier) {
2669
659
                        c++;
2670
659
                    }
2671
80
                }
2672
203
            }
2673
360
        }
2674
2675
504
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
504
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
504
        const auto& result = results.back();
2682
2683
504
        if ( result.second != std::nullopt ) {
2684
81
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
81
        }
2691
2692
504
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
504
        if ( options.disableTests == false ) {
2701
504
            tests::test(op, result.second);
2702
504
        }
2703
2704
504
        postprocess(module, op, result);
2705
504
    }
2706
2707
286
    if ( options.noCompare == false ) {
2708
144
        compare(operations, results, data, size);
2709
144
    }
2710
286
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
1.31k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
1.31k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
1.31k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
6.75k
    do {
2596
6.75k
        auto op = getOp(&parentDs, data, size);
2597
6.75k
        auto module = getModule(parentDs);
2598
6.75k
        if ( module == nullptr ) {
2599
4.76k
            continue;
2600
4.76k
        }
2601
2602
1.99k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.99k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
43
            break;
2607
43
        }
2608
6.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
1.31k
    if ( operations.empty() == true ) {
2611
86
        return;
2612
86
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
1.22k
#if 1
2616
1.22k
    {
2617
1.22k
        std::set<uint64_t> moduleIDs;
2618
2.09k
        for (const auto& m : modules ) {
2619
2.09k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
2.09k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
2.09k
            moduleIDs.insert(moduleID);
2627
2.09k
        }
2628
2629
1.22k
        std::set<uint64_t> operationModuleIDs;
2630
1.79k
        for (const auto& op : operations) {
2631
1.79k
            operationModuleIDs.insert(op.first->ID);
2632
1.79k
        }
2633
2634
1.22k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
1.22k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
1.22k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
1.22k
        for (const auto& id : addModuleIDs) {
2639
1.01k
            operations.push_back({ modules.at(id), operations[0].second});
2640
1.01k
        }
2641
1.22k
    }
2642
1.22k
#endif
2643
2644
1.22k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
1.22k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
4.03k
    for (size_t i = 0; i < operations.size(); i++) {
2652
2.80k
        auto& operation = operations[i];
2653
2654
2.80k
        auto& module = operation.first;
2655
2.80k
        auto& op = operation.second;
2656
2657
2.80k
        if ( i > 0 ) {
2658
1.76k
            auto& prevModule = operations[i-1].first;
2659
1.76k
            auto& prevOp = operations[i].second;
2660
2661
1.76k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
688
                auto& curModifier = op.modifier.GetVectorPtr();
2663
688
                if ( curModifier.size() == 0 ) {
2664
282k
                    for (size_t j = 0; j < 512; j++) {
2665
282k
                        curModifier.push_back(1);
2666
282k
                    }
2667
551
                } else {
2668
769
                    for (auto& c : curModifier) {
2669
769
                        c++;
2670
769
                    }
2671
137
                }
2672
688
            }
2673
1.76k
        }
2674
2675
2.80k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
2.80k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
2.80k
        const auto& result = results.back();
2682
2683
2.80k
        if ( result.second != std::nullopt ) {
2684
275
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
275
        }
2691
2692
2.80k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
2.80k
        if ( options.disableTests == false ) {
2701
2.80k
            tests::test(op, result.second);
2702
2.80k
        }
2703
2704
2.80k
        postprocess(module, op, result);
2705
2.80k
    }
2706
2707
1.22k
    if ( options.noCompare == false ) {
2708
1.04k
        compare(operations, results, data, size);
2709
1.04k
    }
2710
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
386
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
386
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
386
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.79k
    do {
2596
3.79k
        auto op = getOp(&parentDs, data, size);
2597
3.79k
        auto module = getModule(parentDs);
2598
3.79k
        if ( module == nullptr ) {
2599
3.28k
            continue;
2600
3.28k
        }
2601
2602
507
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
507
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
3.78k
    } while ( parentDs.Get<bool>() == true );
2609
2610
386
    if ( operations.empty() == true ) {
2611
53
        return;
2612
53
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
333
#if 1
2616
333
    {
2617
333
        std::set<uint64_t> moduleIDs;
2618
333
        for (const auto& m : modules ) {
2619
278
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
278
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
278
            moduleIDs.insert(moduleID);
2627
278
        }
2628
2629
333
        std::set<uint64_t> operationModuleIDs;
2630
347
        for (const auto& op : operations) {
2631
347
            operationModuleIDs.insert(op.first->ID);
2632
347
        }
2633
2634
333
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
333
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
333
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
333
        for (const auto& id : addModuleIDs) {
2639
115
            operations.push_back({ modules.at(id), operations[0].second});
2640
115
        }
2641
333
    }
2642
333
#endif
2643
2644
333
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
333
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
795
    for (size_t i = 0; i < operations.size(); i++) {
2652
462
        auto& operation = operations[i];
2653
2654
462
        auto& module = operation.first;
2655
462
        auto& op = operation.second;
2656
2657
462
        if ( i > 0 ) {
2658
323
            auto& prevModule = operations[i-1].first;
2659
323
            auto& prevOp = operations[i].second;
2660
2661
323
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
170
                auto& curModifier = op.modifier.GetVectorPtr();
2663
170
                if ( curModifier.size() == 0 ) {
2664
55.9k
                    for (size_t j = 0; j < 512; j++) {
2665
55.8k
                        curModifier.push_back(1);
2666
55.8k
                    }
2667
109
                } else {
2668
611
                    for (auto& c : curModifier) {
2669
611
                        c++;
2670
611
                    }
2671
61
                }
2672
170
            }
2673
323
        }
2674
2675
462
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
462
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
462
        const auto& result = results.back();
2682
2683
462
        if ( result.second != std::nullopt ) {
2684
76
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
76
        }
2691
2692
462
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
462
        if ( options.disableTests == false ) {
2701
462
            tests::test(op, result.second);
2702
462
        }
2703
2704
462
        postprocess(module, op, result);
2705
462
    }
2706
2707
333
    if ( options.noCompare == false ) {
2708
139
        compare(operations, results, data, size);
2709
139
    }
2710
333
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
313
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
313
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
313
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.29k
    do {
2596
3.29k
        auto op = getOp(&parentDs, data, size);
2597
3.29k
        auto module = getModule(parentDs);
2598
3.29k
        if ( module == nullptr ) {
2599
2.84k
            continue;
2600
2.84k
        }
2601
2602
454
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
454
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
16
            break;
2607
16
        }
2608
3.28k
    } while ( parentDs.Get<bool>() == true );
2609
2610
313
    if ( operations.empty() == true ) {
2611
36
        return;
2612
36
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
277
#if 1
2616
277
    {
2617
277
        std::set<uint64_t> moduleIDs;
2618
277
        for (const auto& m : modules ) {
2619
252
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
252
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
252
            moduleIDs.insert(moduleID);
2627
252
        }
2628
2629
277
        std::set<uint64_t> operationModuleIDs;
2630
318
        for (const auto& op : operations) {
2631
318
            operationModuleIDs.insert(op.first->ID);
2632
318
        }
2633
2634
277
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
277
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
277
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
277
        for (const auto& id : addModuleIDs) {
2639
101
            operations.push_back({ modules.at(id), operations[0].second});
2640
101
        }
2641
277
    }
2642
277
#endif
2643
2644
277
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
277
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
696
    for (size_t i = 0; i < operations.size(); i++) {
2652
419
        auto& operation = operations[i];
2653
2654
419
        auto& module = operation.first;
2655
419
        auto& op = operation.second;
2656
2657
419
        if ( i > 0 ) {
2658
293
            auto& prevModule = operations[i-1].first;
2659
293
            auto& prevOp = operations[i].second;
2660
2661
293
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
154
                auto& curModifier = op.modifier.GetVectorPtr();
2663
154
                if ( curModifier.size() == 0 ) {
2664
48.2k
                    for (size_t j = 0; j < 512; j++) {
2665
48.1k
                        curModifier.push_back(1);
2666
48.1k
                    }
2667
94
                } else {
2668
757
                    for (auto& c : curModifier) {
2669
757
                        c++;
2670
757
                    }
2671
60
                }
2672
154
            }
2673
293
        }
2674
2675
419
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
419
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
419
        const auto& result = results.back();
2682
2683
419
        if ( result.second != std::nullopt ) {
2684
44
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
44
        }
2691
2692
419
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
419
        if ( options.disableTests == false ) {
2701
419
            tests::test(op, result.second);
2702
419
        }
2703
2704
419
        postprocess(module, op, result);
2705
419
    }
2706
2707
277
    if ( options.noCompare == false ) {
2708
126
        compare(operations, results, data, size);
2709
126
    }
2710
277
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
364
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
364
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
364
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.55k
    do {
2596
5.55k
        auto op = getOp(&parentDs, data, size);
2597
5.55k
        auto module = getModule(parentDs);
2598
5.55k
        if ( module == nullptr ) {
2599
4.97k
            continue;
2600
4.97k
        }
2601
2602
577
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
577
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
21
            break;
2607
21
        }
2608
5.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
364
    if ( operations.empty() == true ) {
2611
44
        return;
2612
44
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
320
#if 1
2616
320
    {
2617
320
        std::set<uint64_t> moduleIDs;
2618
320
        for (const auto& m : modules ) {
2619
312
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
312
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
312
            moduleIDs.insert(moduleID);
2627
312
        }
2628
2629
320
        std::set<uint64_t> operationModuleIDs;
2630
407
        for (const auto& op : operations) {
2631
407
            operationModuleIDs.insert(op.first->ID);
2632
407
        }
2633
2634
320
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
320
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
320
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
320
        for (const auto& id : addModuleIDs) {
2639
131
            operations.push_back({ modules.at(id), operations[0].second});
2640
131
        }
2641
320
    }
2642
320
#endif
2643
2644
320
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
320
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
858
    for (size_t i = 0; i < operations.size(); i++) {
2652
538
        auto& operation = operations[i];
2653
2654
538
        auto& module = operation.first;
2655
538
        auto& op = operation.second;
2656
2657
538
        if ( i > 0 ) {
2658
382
            auto& prevModule = operations[i-1].first;
2659
382
            auto& prevOp = operations[i].second;
2660
2661
382
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
212
                auto& curModifier = op.modifier.GetVectorPtr();
2663
212
                if ( curModifier.size() == 0 ) {
2664
61.5k
                    for (size_t j = 0; j < 512; j++) {
2665
61.4k
                        curModifier.push_back(1);
2666
61.4k
                    }
2667
120
                } else {
2668
665
                    for (auto& c : curModifier) {
2669
665
                        c++;
2670
665
                    }
2671
92
                }
2672
212
            }
2673
382
        }
2674
2675
538
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
538
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
538
        const auto& result = results.back();
2682
2683
538
        if ( result.second != std::nullopt ) {
2684
34
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
34
        }
2691
2692
538
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
538
        if ( options.disableTests == false ) {
2701
538
            tests::test(op, result.second);
2702
538
        }
2703
2704
538
        postprocess(module, op, result);
2705
538
    }
2706
2707
320
    if ( options.noCompare == false ) {
2708
156
        compare(operations, results, data, size);
2709
156
    }
2710
320
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
322
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
322
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
322
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.79k
    do {
2596
4.79k
        auto op = getOp(&parentDs, data, size);
2597
4.79k
        auto module = getModule(parentDs);
2598
4.79k
        if ( module == nullptr ) {
2599
4.41k
            continue;
2600
4.41k
        }
2601
2602
383
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
383
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
4.78k
    } while ( parentDs.Get<bool>() == true );
2609
2610
322
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
295
#if 1
2616
295
    {
2617
295
        std::set<uint64_t> moduleIDs;
2618
295
        for (const auto& m : modules ) {
2619
162
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
162
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
162
            moduleIDs.insert(moduleID);
2627
162
        }
2628
2629
295
        std::set<uint64_t> operationModuleIDs;
2630
295
        for (const auto& op : operations) {
2631
231
            operationModuleIDs.insert(op.first->ID);
2632
231
        }
2633
2634
295
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
295
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
295
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
295
        for (const auto& id : addModuleIDs) {
2639
58
            operations.push_back({ modules.at(id), operations[0].second});
2640
58
        }
2641
295
    }
2642
295
#endif
2643
2644
295
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
295
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
584
    for (size_t i = 0; i < operations.size(); i++) {
2652
289
        auto& operation = operations[i];
2653
2654
289
        auto& module = operation.first;
2655
289
        auto& op = operation.second;
2656
2657
289
        if ( i > 0 ) {
2658
208
            auto& prevModule = operations[i-1].first;
2659
208
            auto& prevOp = operations[i].second;
2660
2661
208
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
115
                auto& curModifier = op.modifier.GetVectorPtr();
2663
115
                if ( curModifier.size() == 0 ) {
2664
26.1k
                    for (size_t j = 0; j < 512; j++) {
2665
26.1k
                        curModifier.push_back(1);
2666
26.1k
                    }
2667
64
                } else {
2668
566
                    for (auto& c : curModifier) {
2669
566
                        c++;
2670
566
                    }
2671
64
                }
2672
115
            }
2673
208
        }
2674
2675
289
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
289
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
289
        const auto& result = results.back();
2682
2683
289
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
289
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
289
        if ( options.disableTests == false ) {
2701
289
            tests::test(op, result.second);
2702
289
        }
2703
2704
289
        postprocess(module, op, result);
2705
289
    }
2706
2707
295
    if ( options.noCompare == false ) {
2708
81
        compare(operations, results, data, size);
2709
81
    }
2710
295
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
578
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
578
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
578
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.55k
    do {
2596
5.55k
        auto op = getOp(&parentDs, data, size);
2597
5.55k
        auto module = getModule(parentDs);
2598
5.55k
        if ( module == nullptr ) {
2599
4.58k
            continue;
2600
4.58k
        }
2601
2602
969
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
969
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
28
            break;
2607
28
        }
2608
5.52k
    } while ( parentDs.Get<bool>() == true );
2609
2610
578
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
554
#if 1
2616
554
    {
2617
554
        std::set<uint64_t> moduleIDs;
2618
806
        for (const auto& m : modules ) {
2619
806
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
806
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
806
            moduleIDs.insert(moduleID);
2627
806
        }
2628
2629
554
        std::set<uint64_t> operationModuleIDs;
2630
830
        for (const auto& op : operations) {
2631
830
            operationModuleIDs.insert(op.first->ID);
2632
830
        }
2633
2634
554
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
554
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
554
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
554
        for (const auto& id : addModuleIDs) {
2639
374
            operations.push_back({ modules.at(id), operations[0].second});
2640
374
        }
2641
554
    }
2642
554
#endif
2643
2644
554
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
554
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.75k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.20k
        auto& operation = operations[i];
2653
2654
1.20k
        auto& module = operation.first;
2655
1.20k
        auto& op = operation.second;
2656
2657
1.20k
        if ( i > 0 ) {
2658
801
            auto& prevModule = operations[i-1].first;
2659
801
            auto& prevOp = operations[i].second;
2660
2661
801
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
381
                auto& curModifier = op.modifier.GetVectorPtr();
2663
381
                if ( curModifier.size() == 0 ) {
2664
99.5k
                    for (size_t j = 0; j < 512; j++) {
2665
99.3k
                        curModifier.push_back(1);
2666
99.3k
                    }
2667
194
                } else {
2668
5.49k
                    for (auto& c : curModifier) {
2669
5.49k
                        c++;
2670
5.49k
                    }
2671
187
                }
2672
381
            }
2673
801
        }
2674
2675
1.20k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.20k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.20k
        const auto& result = results.back();
2682
2683
1.20k
        if ( result.second != std::nullopt ) {
2684
101
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
101
        }
2691
2692
1.20k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.20k
        if ( options.disableTests == false ) {
2701
1.20k
            tests::test(op, result.second);
2702
1.20k
        }
2703
2704
1.20k
        postprocess(module, op, result);
2705
1.20k
    }
2706
2707
554
    if ( options.noCompare == false ) {
2708
403
        compare(operations, results, data, size);
2709
403
    }
2710
554
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
12.9k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
12.9k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
12.9k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
32.1k
    do {
2596
32.1k
        auto op = getOp(&parentDs, data, size);
2597
32.1k
        auto module = getModule(parentDs);
2598
32.1k
        if ( module == nullptr ) {
2599
13.9k
            continue;
2600
13.9k
        }
2601
2602
18.2k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
18.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
253
            break;
2607
253
        }
2608
31.8k
    } while ( parentDs.Get<bool>() == true );
2609
2610
12.9k
    if ( operations.empty() == true ) {
2611
125
        return;
2612
125
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
12.8k
#if 1
2616
12.8k
    {
2617
12.8k
        std::set<uint64_t> moduleIDs;
2618
24.7k
        for (const auto& m : modules ) {
2619
24.7k
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
24.7k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
24.7k
            moduleIDs.insert(moduleID);
2627
24.7k
        }
2628
2629
12.8k
        std::set<uint64_t> operationModuleIDs;
2630
17.6k
        for (const auto& op : operations) {
2631
17.6k
            operationModuleIDs.insert(op.first->ID);
2632
17.6k
        }
2633
2634
12.8k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
12.8k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
12.8k
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
12.8k
        for (const auto& id : addModuleIDs) {
2639
12.3k
            operations.push_back({ modules.at(id), operations[0].second});
2640
12.3k
        }
2641
12.8k
    }
2642
12.8k
#endif
2643
2644
12.8k
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
12.8k
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
42.8k
    for (size_t i = 0; i < operations.size(); i++) {
2652
29.9k
        auto& operation = operations[i];
2653
2654
29.9k
        auto& module = operation.first;
2655
29.9k
        auto& op = operation.second;
2656
2657
29.9k
        if ( i > 0 ) {
2658
17.6k
            auto& prevModule = operations[i-1].first;
2659
17.6k
            auto& prevOp = operations[i].second;
2660
2661
17.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
5.22k
                auto& curModifier = op.modifier.GetVectorPtr();
2663
5.22k
                if ( curModifier.size() == 0 ) {
2664
1.38M
                    for (size_t j = 0; j < 512; j++) {
2665
1.37M
                        curModifier.push_back(1);
2666
1.37M
                    }
2667
2.69k
                } else {
2668
123k
                    for (auto& c : curModifier) {
2669
123k
                        c++;
2670
123k
                    }
2671
2.53k
                }
2672
5.22k
            }
2673
17.6k
        }
2674
2675
29.9k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
29.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
29.9k
        const auto& result = results.back();
2682
2683
29.9k
        if ( result.second != std::nullopt ) {
2684
7.72k
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
7.72k
        }
2691
2692
29.9k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
29.9k
        if ( options.disableTests == false ) {
2701
29.9k
            tests::test(op, result.second);
2702
29.9k
        }
2703
2704
29.9k
        postprocess(module, op, result);
2705
29.9k
    }
2706
2707
12.8k
    if ( options.noCompare == false ) {
2708
12.3k
        compare(operations, results, data, size);
2709
12.3k
    }
2710
12.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
242
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
242
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
242
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.17k
    do {
2596
4.17k
        auto op = getOp(&parentDs, data, size);
2597
4.17k
        auto module = getModule(parentDs);
2598
4.17k
        if ( module == nullptr ) {
2599
3.72k
            continue;
2600
3.72k
        }
2601
2602
445
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
445
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
4.15k
    } while ( parentDs.Get<bool>() == true );
2609
2610
242
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
226
#if 1
2616
226
    {
2617
226
        std::set<uint64_t> moduleIDs;
2618
262
        for (const auto& m : modules ) {
2619
262
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
262
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
262
            moduleIDs.insert(moduleID);
2627
262
        }
2628
2629
226
        std::set<uint64_t> operationModuleIDs;
2630
308
        for (const auto& op : operations) {
2631
308
            operationModuleIDs.insert(op.first->ID);
2632
308
        }
2633
2634
226
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
226
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
226
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
226
        for (const auto& id : addModuleIDs) {
2639
107
            operations.push_back({ modules.at(id), operations[0].second});
2640
107
        }
2641
226
    }
2642
226
#endif
2643
2644
226
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
226
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
641
    for (size_t i = 0; i < operations.size(); i++) {
2652
415
        auto& operation = operations[i];
2653
2654
415
        auto& module = operation.first;
2655
415
        auto& op = operation.second;
2656
2657
415
        if ( i > 0 ) {
2658
284
            auto& prevModule = operations[i-1].first;
2659
284
            auto& prevOp = operations[i].second;
2660
2661
284
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
137
                auto& curModifier = op.modifier.GetVectorPtr();
2663
137
                if ( curModifier.size() == 0 ) {
2664
29.7k
                    for (size_t j = 0; j < 512; j++) {
2665
29.6k
                        curModifier.push_back(1);
2666
29.6k
                    }
2667
79
                } else {
2668
1.39k
                    for (auto& c : curModifier) {
2669
1.39k
                        c++;
2670
1.39k
                    }
2671
79
                }
2672
137
            }
2673
284
        }
2674
2675
415
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
415
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
415
        const auto& result = results.back();
2682
2683
415
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
415
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
415
        if ( options.disableTests == false ) {
2701
415
            tests::test(op, result.second);
2702
415
        }
2703
2704
415
        postprocess(module, op, result);
2705
415
    }
2706
2707
226
    if ( options.noCompare == false ) {
2708
131
        compare(operations, results, data, size);
2709
131
    }
2710
226
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
598
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
598
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
598
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
6.01k
    do {
2596
6.01k
        auto op = getOp(&parentDs, data, size);
2597
6.01k
        auto module = getModule(parentDs);
2598
6.01k
        if ( module == nullptr ) {
2599
4.89k
            continue;
2600
4.89k
        }
2601
2602
1.11k
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
1.11k
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
45
            break;
2607
45
        }
2608
5.97k
    } while ( parentDs.Get<bool>() == true );
2609
2610
598
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
585
#if 1
2616
585
    {
2617
585
        std::set<uint64_t> moduleIDs;
2618
894
        for (const auto& m : modules ) {
2619
894
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
894
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
894
            moduleIDs.insert(moduleID);
2627
894
        }
2628
2629
585
        std::set<uint64_t> operationModuleIDs;
2630
935
        for (const auto& op : operations) {
2631
935
            operationModuleIDs.insert(op.first->ID);
2632
935
        }
2633
2634
585
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
585
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
585
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
585
        for (const auto& id : addModuleIDs) {
2639
429
            operations.push_back({ modules.at(id), operations[0].second});
2640
429
        }
2641
585
    }
2642
585
#endif
2643
2644
585
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
585
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
1.94k
    for (size_t i = 0; i < operations.size(); i++) {
2652
1.36k
        auto& operation = operations[i];
2653
2654
1.36k
        auto& module = operation.first;
2655
1.36k
        auto& op = operation.second;
2656
2657
1.36k
        if ( i > 0 ) {
2658
917
            auto& prevModule = operations[i-1].first;
2659
917
            auto& prevOp = operations[i].second;
2660
2661
917
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
455
                auto& curModifier = op.modifier.GetVectorPtr();
2663
455
                if ( curModifier.size() == 0 ) {
2664
111k
                    for (size_t j = 0; j < 512; j++) {
2665
111k
                        curModifier.push_back(1);
2666
111k
                    }
2667
237
                } else {
2668
1.48k
                    for (auto& c : curModifier) {
2669
1.48k
                        c++;
2670
1.48k
                    }
2671
237
                }
2672
455
            }
2673
917
        }
2674
2675
1.36k
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
1.36k
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
1.36k
        const auto& result = results.back();
2682
2683
1.36k
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
1.36k
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
1.36k
        if ( options.disableTests == false ) {
2701
1.36k
            tests::test(op, result.second);
2702
1.36k
        }
2703
2704
1.36k
        postprocess(module, op, result);
2705
1.36k
    }
2706
2707
585
    if ( options.noCompare == false ) {
2708
447
        compare(operations, results, data, size);
2709
447
    }
2710
585
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
301
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
301
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
301
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.28k
    do {
2596
3.28k
        auto op = getOp(&parentDs, data, size);
2597
3.28k
        auto module = getModule(parentDs);
2598
3.28k
        if ( module == nullptr ) {
2599
2.89k
            continue;
2600
2.89k
        }
2601
2602
392
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
392
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
19
            break;
2607
19
        }
2608
3.26k
    } while ( parentDs.Get<bool>() == true );
2609
2610
301
    if ( operations.empty() == true ) {
2611
45
        return;
2612
45
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
256
#if 1
2616
256
    {
2617
256
        std::set<uint64_t> moduleIDs;
2618
256
        for (const auto& m : modules ) {
2619
168
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
168
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
168
            moduleIDs.insert(moduleID);
2627
168
        }
2628
2629
256
        std::set<uint64_t> operationModuleIDs;
2630
256
        for (const auto& op : operations) {
2631
242
            operationModuleIDs.insert(op.first->ID);
2632
242
        }
2633
2634
256
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
256
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
256
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
256
        for (const auto& id : addModuleIDs) {
2639
61
            operations.push_back({ modules.at(id), operations[0].second});
2640
61
        }
2641
256
    }
2642
256
#endif
2643
2644
256
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
256
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
559
    for (size_t i = 0; i < operations.size(); i++) {
2652
303
        auto& operation = operations[i];
2653
2654
303
        auto& module = operation.first;
2655
303
        auto& op = operation.second;
2656
2657
303
        if ( i > 0 ) {
2658
219
            auto& prevModule = operations[i-1].first;
2659
219
            auto& prevOp = operations[i].second;
2660
2661
219
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
119
                auto& curModifier = op.modifier.GetVectorPtr();
2663
119
                if ( curModifier.size() == 0 ) {
2664
32.3k
                    for (size_t j = 0; j < 512; j++) {
2665
32.2k
                        curModifier.push_back(1);
2666
32.2k
                    }
2667
63
                } else {
2668
918
                    for (auto& c : curModifier) {
2669
918
                        c++;
2670
918
                    }
2671
56
                }
2672
119
            }
2673
219
        }
2674
2675
303
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
303
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
303
        const auto& result = results.back();
2682
2683
303
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
303
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
303
        if ( options.disableTests == false ) {
2701
303
            tests::test(op, result.second);
2702
303
        }
2703
2704
303
        postprocess(module, op, result);
2705
303
    }
2706
2707
256
    if ( options.noCompare == false ) {
2708
84
        compare(operations, results, data, size);
2709
84
    }
2710
256
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
250
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
250
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
250
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.23k
    do {
2596
3.23k
        auto op = getOp(&parentDs, data, size);
2597
3.23k
        auto module = getModule(parentDs);
2598
3.23k
        if ( module == nullptr ) {
2599
2.87k
            continue;
2600
2.87k
        }
2601
2602
364
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
364
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
3.22k
    } while ( parentDs.Get<bool>() == true );
2609
2610
250
    if ( operations.empty() == true ) {
2611
36
        return;
2612
36
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
214
#if 1
2616
214
    {
2617
214
        std::set<uint64_t> moduleIDs;
2618
214
        for (const auto& m : modules ) {
2619
164
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
164
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
164
            moduleIDs.insert(moduleID);
2627
164
        }
2628
2629
214
        std::set<uint64_t> operationModuleIDs;
2630
217
        for (const auto& op : operations) {
2631
217
            operationModuleIDs.insert(op.first->ID);
2632
217
        }
2633
2634
214
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
214
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
214
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
214
        for (const auto& id : addModuleIDs) {
2639
58
            operations.push_back({ modules.at(id), operations[0].second});
2640
58
        }
2641
214
    }
2642
214
#endif
2643
2644
214
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
214
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
489
    for (size_t i = 0; i < operations.size(); i++) {
2652
275
        auto& operation = operations[i];
2653
2654
275
        auto& module = operation.first;
2655
275
        auto& op = operation.second;
2656
2657
275
        if ( i > 0 ) {
2658
193
            auto& prevModule = operations[i-1].first;
2659
193
            auto& prevOp = operations[i].second;
2660
2661
193
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
96
                auto& curModifier = op.modifier.GetVectorPtr();
2663
96
                if ( curModifier.size() == 0 ) {
2664
21.5k
                    for (size_t j = 0; j < 512; j++) {
2665
21.5k
                        curModifier.push_back(1);
2666
21.5k
                    }
2667
54
                } else {
2668
679
                    for (auto& c : curModifier) {
2669
679
                        c++;
2670
679
                    }
2671
54
                }
2672
96
            }
2673
193
        }
2674
2675
275
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
275
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
275
        const auto& result = results.back();
2682
2683
275
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
275
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
275
        if ( options.disableTests == false ) {
2701
275
            tests::test(op, result.second);
2702
275
        }
2703
2704
275
        postprocess(module, op, result);
2705
275
    }
2706
2707
214
    if ( options.noCompare == false ) {
2708
82
        compare(operations, results, data, size);
2709
82
    }
2710
214
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.38k
    do {
2596
4.38k
        auto op = getOp(&parentDs, data, size);
2597
4.38k
        auto module = getModule(parentDs);
2598
4.38k
        if ( module == nullptr ) {
2599
4.04k
            continue;
2600
4.04k
        }
2601
2602
335
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
335
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
11
            break;
2607
11
        }
2608
4.37k
    } while ( parentDs.Get<bool>() == true );
2609
2610
194
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
185
#if 1
2616
185
    {
2617
185
        std::set<uint64_t> moduleIDs;
2618
185
        for (const auto& m : modules ) {
2619
148
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
148
            moduleIDs.insert(moduleID);
2627
148
        }
2628
2629
185
        std::set<uint64_t> operationModuleIDs;
2630
200
        for (const auto& op : operations) {
2631
200
            operationModuleIDs.insert(op.first->ID);
2632
200
        }
2633
2634
185
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
185
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
185
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
185
        for (const auto& id : addModuleIDs) {
2639
53
            operations.push_back({ modules.at(id), operations[0].second});
2640
53
        }
2641
185
    }
2642
185
#endif
2643
2644
185
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
185
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
438
    for (size_t i = 0; i < operations.size(); i++) {
2652
253
        auto& operation = operations[i];
2653
2654
253
        auto& module = operation.first;
2655
253
        auto& op = operation.second;
2656
2657
253
        if ( i > 0 ) {
2658
179
            auto& prevModule = operations[i-1].first;
2659
179
            auto& prevOp = operations[i].second;
2660
2661
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
93
                auto& curModifier = op.modifier.GetVectorPtr();
2663
93
                if ( curModifier.size() == 0 ) {
2664
25.6k
                    for (size_t j = 0; j < 512; j++) {
2665
25.6k
                        curModifier.push_back(1);
2666
25.6k
                    }
2667
50
                } else {
2668
589
                    for (auto& c : curModifier) {
2669
589
                        c++;
2670
589
                    }
2671
43
                }
2672
93
            }
2673
179
        }
2674
2675
253
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
253
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
253
        const auto& result = results.back();
2682
2683
253
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
253
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
253
        if ( options.disableTests == false ) {
2701
253
            tests::test(op, result.second);
2702
253
        }
2703
2704
253
        postprocess(module, op, result);
2705
253
    }
2706
2707
185
    if ( options.noCompare == false ) {
2708
74
        compare(operations, results, data, size);
2709
74
    }
2710
185
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
242
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
242
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
242
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.67k
    do {
2596
4.67k
        auto op = getOp(&parentDs, data, size);
2597
4.67k
        auto module = getModule(parentDs);
2598
4.67k
        if ( module == nullptr ) {
2599
4.27k
            continue;
2600
4.27k
        }
2601
2602
400
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
400
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
4.66k
    } while ( parentDs.Get<bool>() == true );
2609
2610
242
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
215
#if 1
2616
215
    {
2617
215
        std::set<uint64_t> moduleIDs;
2618
215
        for (const auto& m : modules ) {
2619
162
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
162
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
162
            moduleIDs.insert(moduleID);
2627
162
        }
2628
2629
215
        std::set<uint64_t> operationModuleIDs;
2630
236
        for (const auto& op : operations) {
2631
236
            operationModuleIDs.insert(op.first->ID);
2632
236
        }
2633
2634
215
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
215
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
215
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
215
        for (const auto& id : addModuleIDs) {
2639
54
            operations.push_back({ modules.at(id), operations[0].second});
2640
54
        }
2641
215
    }
2642
215
#endif
2643
2644
215
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
215
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
505
    for (size_t i = 0; i < operations.size(); i++) {
2652
290
        auto& operation = operations[i];
2653
2654
290
        auto& module = operation.first;
2655
290
        auto& op = operation.second;
2656
2657
290
        if ( i > 0 ) {
2658
209
            auto& prevModule = operations[i-1].first;
2659
209
            auto& prevOp = operations[i].second;
2660
2661
209
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
111
                auto& curModifier = op.modifier.GetVectorPtr();
2663
111
                if ( curModifier.size() == 0 ) {
2664
19.4k
                    for (size_t j = 0; j < 512; j++) {
2665
19.4k
                        curModifier.push_back(1);
2666
19.4k
                    }
2667
73
                } else {
2668
1.23k
                    for (auto& c : curModifier) {
2669
1.23k
                        c++;
2670
1.23k
                    }
2671
73
                }
2672
111
            }
2673
209
        }
2674
2675
290
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
290
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
290
        const auto& result = results.back();
2682
2683
290
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
290
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
290
        if ( options.disableTests == false ) {
2701
290
            tests::test(op, result.second);
2702
290
        }
2703
2704
290
        postprocess(module, op, result);
2705
290
    }
2706
2707
215
    if ( options.noCompare == false ) {
2708
81
        compare(operations, results, data, size);
2709
81
    }
2710
215
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
379
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
379
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
379
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.36k
    do {
2596
4.36k
        auto op = getOp(&parentDs, data, size);
2597
4.36k
        auto module = getModule(parentDs);
2598
4.36k
        if ( module == nullptr ) {
2599
3.84k
            continue;
2600
3.84k
        }
2601
2602
514
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
514
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.34k
    } while ( parentDs.Get<bool>() == true );
2609
2610
379
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
356
#if 1
2616
356
    {
2617
356
        std::set<uint64_t> moduleIDs;
2618
356
        for (const auto& m : modules ) {
2619
176
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
176
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
176
            moduleIDs.insert(moduleID);
2627
176
        }
2628
2629
356
        std::set<uint64_t> operationModuleIDs;
2630
356
        for (const auto& op : operations) {
2631
235
            operationModuleIDs.insert(op.first->ID);
2632
235
        }
2633
2634
356
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
356
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
356
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
356
        for (const auto& id : addModuleIDs) {
2639
67
            operations.push_back({ modules.at(id), operations[0].second});
2640
67
        }
2641
356
    }
2642
356
#endif
2643
2644
356
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
356
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
658
    for (size_t i = 0; i < operations.size(); i++) {
2652
302
        auto& operation = operations[i];
2653
2654
302
        auto& module = operation.first;
2655
302
        auto& op = operation.second;
2656
2657
302
        if ( i > 0 ) {
2658
214
            auto& prevModule = operations[i-1].first;
2659
214
            auto& prevOp = operations[i].second;
2660
2661
214
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
114
                auto& curModifier = op.modifier.GetVectorPtr();
2663
114
                if ( curModifier.size() == 0 ) {
2664
28.2k
                    for (size_t j = 0; j < 512; j++) {
2665
28.1k
                        curModifier.push_back(1);
2666
28.1k
                    }
2667
59
                } else {
2668
5.72k
                    for (auto& c : curModifier) {
2669
5.72k
                        c++;
2670
5.72k
                    }
2671
59
                }
2672
114
            }
2673
214
        }
2674
2675
302
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
302
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
302
        const auto& result = results.back();
2682
2683
302
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
302
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
302
        if ( options.disableTests == false ) {
2701
302
            tests::test(op, result.second);
2702
302
        }
2703
2704
302
        postprocess(module, op, result);
2705
302
    }
2706
2707
356
    if ( options.noCompare == false ) {
2708
88
        compare(operations, results, data, size);
2709
88
    }
2710
356
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
427
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
427
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
427
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.61k
    do {
2596
3.61k
        auto op = getOp(&parentDs, data, size);
2597
3.61k
        auto module = getModule(parentDs);
2598
3.61k
        if ( module == nullptr ) {
2599
3.10k
            continue;
2600
3.10k
        }
2601
2602
505
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
505
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
3.60k
    } while ( parentDs.Get<bool>() == true );
2609
2610
427
    if ( operations.empty() == true ) {
2611
32
        return;
2612
32
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
395
#if 1
2616
395
    {
2617
395
        std::set<uint64_t> moduleIDs;
2618
395
        for (const auto& m : modules ) {
2619
166
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
166
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
166
            moduleIDs.insert(moduleID);
2627
166
        }
2628
2629
395
        std::set<uint64_t> operationModuleIDs;
2630
395
        for (const auto& op : operations) {
2631
223
            operationModuleIDs.insert(op.first->ID);
2632
223
        }
2633
2634
395
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
395
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
395
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
395
        for (const auto& id : addModuleIDs) {
2639
62
            operations.push_back({ modules.at(id), operations[0].second});
2640
62
        }
2641
395
    }
2642
395
#endif
2643
2644
395
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
395
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
680
    for (size_t i = 0; i < operations.size(); i++) {
2652
285
        auto& operation = operations[i];
2653
2654
285
        auto& module = operation.first;
2655
285
        auto& op = operation.second;
2656
2657
285
        if ( i > 0 ) {
2658
202
            auto& prevModule = operations[i-1].first;
2659
202
            auto& prevOp = operations[i].second;
2660
2661
202
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
107
                auto& curModifier = op.modifier.GetVectorPtr();
2663
107
                if ( curModifier.size() == 0 ) {
2664
24.1k
                    for (size_t j = 0; j < 512; j++) {
2665
24.0k
                        curModifier.push_back(1);
2666
24.0k
                    }
2667
60
                } else {
2668
1.56k
                    for (auto& c : curModifier) {
2669
1.56k
                        c++;
2670
1.56k
                    }
2671
60
                }
2672
107
            }
2673
202
        }
2674
2675
285
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
285
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
285
        const auto& result = results.back();
2682
2683
285
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
285
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
285
        if ( options.disableTests == false ) {
2701
285
            tests::test(op, result.second);
2702
285
        }
2703
2704
285
        postprocess(module, op, result);
2705
285
    }
2706
2707
395
    if ( options.noCompare == false ) {
2708
83
        compare(operations, results, data, size);
2709
83
    }
2710
395
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
332
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
332
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
332
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.65k
    do {
2596
3.65k
        auto op = getOp(&parentDs, data, size);
2597
3.65k
        auto module = getModule(parentDs);
2598
3.65k
        if ( module == nullptr ) {
2599
3.16k
            continue;
2600
3.16k
        }
2601
2602
488
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
488
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
3.63k
    } while ( parentDs.Get<bool>() == true );
2609
2610
332
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
323
#if 1
2616
323
    {
2617
323
        std::set<uint64_t> moduleIDs;
2618
323
        for (const auto& m : modules ) {
2619
154
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
154
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
154
            moduleIDs.insert(moduleID);
2627
154
        }
2628
2629
323
        std::set<uint64_t> operationModuleIDs;
2630
323
        for (const auto& op : operations) {
2631
212
            operationModuleIDs.insert(op.first->ID);
2632
212
        }
2633
2634
323
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
323
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
323
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
323
        for (const auto& id : addModuleIDs) {
2639
54
            operations.push_back({ modules.at(id), operations[0].second});
2640
54
        }
2641
323
    }
2642
323
#endif
2643
2644
323
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
323
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
589
    for (size_t i = 0; i < operations.size(); i++) {
2652
266
        auto& operation = operations[i];
2653
2654
266
        auto& module = operation.first;
2655
266
        auto& op = operation.second;
2656
2657
266
        if ( i > 0 ) {
2658
189
            auto& prevModule = operations[i-1].first;
2659
189
            auto& prevOp = operations[i].second;
2660
2661
189
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
99
                auto& curModifier = op.modifier.GetVectorPtr();
2663
99
                if ( curModifier.size() == 0 ) {
2664
24.6k
                    for (size_t j = 0; j < 512; j++) {
2665
24.5k
                        curModifier.push_back(1);
2666
24.5k
                    }
2667
51
                } else {
2668
1.10k
                    for (auto& c : curModifier) {
2669
1.10k
                        c++;
2670
1.10k
                    }
2671
51
                }
2672
99
            }
2673
189
        }
2674
2675
266
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
266
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
266
        const auto& result = results.back();
2682
2683
266
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
266
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
266
        if ( options.disableTests == false ) {
2701
266
            tests::test(op, result.second);
2702
266
        }
2703
2704
266
        postprocess(module, op, result);
2705
266
    }
2706
2707
323
    if ( options.noCompare == false ) {
2708
77
        compare(operations, results, data, size);
2709
77
    }
2710
323
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
319
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
319
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
319
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.01k
    do {
2596
4.01k
        auto op = getOp(&parentDs, data, size);
2597
4.01k
        auto module = getModule(parentDs);
2598
4.01k
        if ( module == nullptr ) {
2599
3.57k
            continue;
2600
3.57k
        }
2601
2602
442
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
442
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.00k
    } while ( parentDs.Get<bool>() == true );
2609
2610
319
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
298
#if 1
2616
298
    {
2617
298
        std::set<uint64_t> moduleIDs;
2618
298
        for (const auto& m : modules ) {
2619
130
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
130
            moduleIDs.insert(moduleID);
2627
130
        }
2628
2629
298
        std::set<uint64_t> operationModuleIDs;
2630
298
        for (const auto& op : operations) {
2631
195
            operationModuleIDs.insert(op.first->ID);
2632
195
        }
2633
2634
298
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
298
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
298
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
298
        for (const auto& id : addModuleIDs) {
2639
43
            operations.push_back({ modules.at(id), operations[0].second});
2640
43
        }
2641
298
    }
2642
298
#endif
2643
2644
298
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
298
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
536
    for (size_t i = 0; i < operations.size(); i++) {
2652
238
        auto& operation = operations[i];
2653
2654
238
        auto& module = operation.first;
2655
238
        auto& op = operation.second;
2656
2657
238
        if ( i > 0 ) {
2658
173
            auto& prevModule = operations[i-1].first;
2659
173
            auto& prevOp = operations[i].second;
2660
2661
173
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
96
                auto& curModifier = op.modifier.GetVectorPtr();
2663
96
                if ( curModifier.size() == 0 ) {
2664
25.1k
                    for (size_t j = 0; j < 512; j++) {
2665
25.0k
                        curModifier.push_back(1);
2666
25.0k
                    }
2667
49
                } else {
2668
780
                    for (auto& c : curModifier) {
2669
780
                        c++;
2670
780
                    }
2671
47
                }
2672
96
            }
2673
173
        }
2674
2675
238
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
238
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
238
        const auto& result = results.back();
2682
2683
238
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
238
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
238
        if ( options.disableTests == false ) {
2701
238
            tests::test(op, result.second);
2702
238
        }
2703
2704
238
        postprocess(module, op, result);
2705
238
    }
2706
2707
298
    if ( options.noCompare == false ) {
2708
65
        compare(operations, results, data, size);
2709
65
    }
2710
298
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
231
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
231
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
231
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.92k
    do {
2596
4.92k
        auto op = getOp(&parentDs, data, size);
2597
4.92k
        auto module = getModule(parentDs);
2598
4.92k
        if ( module == nullptr ) {
2599
4.57k
            continue;
2600
4.57k
        }
2601
2602
347
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
347
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.91k
    } while ( parentDs.Get<bool>() == true );
2609
2610
231
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
210
#if 1
2616
210
    {
2617
210
        std::set<uint64_t> moduleIDs;
2618
210
        for (const auto& m : modules ) {
2619
112
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
112
            moduleIDs.insert(moduleID);
2627
112
        }
2628
2629
210
        std::set<uint64_t> operationModuleIDs;
2630
210
        for (const auto& op : operations) {
2631
177
            operationModuleIDs.insert(op.first->ID);
2632
177
        }
2633
2634
210
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
210
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
210
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
210
        for (const auto& id : addModuleIDs) {
2639
32
            operations.push_back({ modules.at(id), operations[0].second});
2640
32
        }
2641
210
    }
2642
210
#endif
2643
2644
210
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
210
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
419
    for (size_t i = 0; i < operations.size(); i++) {
2652
209
        auto& operation = operations[i];
2653
2654
209
        auto& module = operation.first;
2655
209
        auto& op = operation.second;
2656
2657
209
        if ( i > 0 ) {
2658
153
            auto& prevModule = operations[i-1].first;
2659
153
            auto& prevOp = operations[i].second;
2660
2661
153
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
80
                auto& curModifier = op.modifier.GetVectorPtr();
2663
80
                if ( curModifier.size() == 0 ) {
2664
17.9k
                    for (size_t j = 0; j < 512; j++) {
2665
17.9k
                        curModifier.push_back(1);
2666
17.9k
                    }
2667
45
                } else {
2668
650
                    for (auto& c : curModifier) {
2669
650
                        c++;
2670
650
                    }
2671
45
                }
2672
80
            }
2673
153
        }
2674
2675
209
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
209
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
209
        const auto& result = results.back();
2682
2683
209
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
209
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
209
        if ( options.disableTests == false ) {
2701
209
            tests::test(op, result.second);
2702
209
        }
2703
2704
209
        postprocess(module, op, result);
2705
209
    }
2706
2707
210
    if ( options.noCompare == false ) {
2708
56
        compare(operations, results, data, size);
2709
56
    }
2710
210
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.03k
    do {
2596
4.03k
        auto op = getOp(&parentDs, data, size);
2597
4.03k
        auto module = getModule(parentDs);
2598
4.03k
        if ( module == nullptr ) {
2599
3.65k
            continue;
2600
3.65k
        }
2601
2602
374
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
374
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
4.01k
    } while ( parentDs.Get<bool>() == true );
2609
2610
221
    if ( operations.empty() == true ) {
2611
9
        return;
2612
9
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
212
#if 1
2616
212
    {
2617
212
        std::set<uint64_t> moduleIDs;
2618
212
        for (const auto& m : modules ) {
2619
124
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
124
            moduleIDs.insert(moduleID);
2627
124
        }
2628
2629
212
        std::set<uint64_t> operationModuleIDs;
2630
212
        for (const auto& op : operations) {
2631
185
            operationModuleIDs.insert(op.first->ID);
2632
185
        }
2633
2634
212
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
212
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
212
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
212
        for (const auto& id : addModuleIDs) {
2639
39
            operations.push_back({ modules.at(id), operations[0].second});
2640
39
        }
2641
212
    }
2642
212
#endif
2643
2644
212
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
212
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
436
    for (size_t i = 0; i < operations.size(); i++) {
2652
224
        auto& operation = operations[i];
2653
2654
224
        auto& module = operation.first;
2655
224
        auto& op = operation.second;
2656
2657
224
        if ( i > 0 ) {
2658
162
            auto& prevModule = operations[i-1].first;
2659
162
            auto& prevOp = operations[i].second;
2660
2661
162
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
84
                auto& curModifier = op.modifier.GetVectorPtr();
2663
84
                if ( curModifier.size() == 0 ) {
2664
16.4k
                    for (size_t j = 0; j < 512; j++) {
2665
16.3k
                        curModifier.push_back(1);
2666
16.3k
                    }
2667
52
                } else {
2668
2.03k
                    for (auto& c : curModifier) {
2669
2.03k
                        c++;
2670
2.03k
                    }
2671
52
                }
2672
84
            }
2673
162
        }
2674
2675
224
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
224
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
224
        const auto& result = results.back();
2682
2683
224
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
224
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
224
        if ( options.disableTests == false ) {
2701
224
            tests::test(op, result.second);
2702
224
        }
2703
2704
224
        postprocess(module, op, result);
2705
224
    }
2706
2707
212
    if ( options.noCompare == false ) {
2708
62
        compare(operations, results, data, size);
2709
62
    }
2710
212
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
248
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
248
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
248
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.26k
    do {
2596
4.26k
        auto op = getOp(&parentDs, data, size);
2597
4.26k
        auto module = getModule(parentDs);
2598
4.26k
        if ( module == nullptr ) {
2599
3.84k
            continue;
2600
3.84k
        }
2601
2602
424
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
424
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
4.25k
    } while ( parentDs.Get<bool>() == true );
2609
2610
248
    if ( operations.empty() == true ) {
2611
8
        return;
2612
8
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
240
#if 1
2616
240
    {
2617
240
        std::set<uint64_t> moduleIDs;
2618
240
        for (const auto& m : modules ) {
2619
184
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
184
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
184
            moduleIDs.insert(moduleID);
2627
184
        }
2628
2629
240
        std::set<uint64_t> operationModuleIDs;
2630
242
        for (const auto& op : operations) {
2631
242
            operationModuleIDs.insert(op.first->ID);
2632
242
        }
2633
2634
240
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
240
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
240
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
240
        for (const auto& id : addModuleIDs) {
2639
72
            operations.push_back({ modules.at(id), operations[0].second});
2640
72
        }
2641
240
    }
2642
240
#endif
2643
2644
240
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
240
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
554
    for (size_t i = 0; i < operations.size(); i++) {
2652
314
        auto& operation = operations[i];
2653
2654
314
        auto& module = operation.first;
2655
314
        auto& op = operation.second;
2656
2657
314
        if ( i > 0 ) {
2658
222
            auto& prevModule = operations[i-1].first;
2659
222
            auto& prevOp = operations[i].second;
2660
2661
222
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
118
                auto& curModifier = op.modifier.GetVectorPtr();
2663
118
                if ( curModifier.size() == 0 ) {
2664
32.3k
                    for (size_t j = 0; j < 512; j++) {
2665
32.2k
                        curModifier.push_back(1);
2666
32.2k
                    }
2667
63
                } else {
2668
1.12k
                    for (auto& c : curModifier) {
2669
1.12k
                        c++;
2670
1.12k
                    }
2671
55
                }
2672
118
            }
2673
222
        }
2674
2675
314
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
314
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
314
        const auto& result = results.back();
2682
2683
314
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
314
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
314
        if ( options.disableTests == false ) {
2701
314
            tests::test(op, result.second);
2702
314
        }
2703
2704
314
        postprocess(module, op, result);
2705
314
    }
2706
2707
240
    if ( options.noCompare == false ) {
2708
92
        compare(operations, results, data, size);
2709
92
    }
2710
240
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
257
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
257
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
257
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.44k
    do {
2596
4.44k
        auto op = getOp(&parentDs, data, size);
2597
4.44k
        auto module = getModule(parentDs);
2598
4.44k
        if ( module == nullptr ) {
2599
4.07k
            continue;
2600
4.07k
        }
2601
2602
366
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
366
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.43k
    } while ( parentDs.Get<bool>() == true );
2609
2610
257
    if ( operations.empty() == true ) {
2611
31
        return;
2612
31
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
226
#if 1
2616
226
    {
2617
226
        std::set<uint64_t> moduleIDs;
2618
226
        for (const auto& m : modules ) {
2619
148
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
148
            moduleIDs.insert(moduleID);
2627
148
        }
2628
2629
226
        std::set<uint64_t> operationModuleIDs;
2630
226
        for (const auto& op : operations) {
2631
202
            operationModuleIDs.insert(op.first->ID);
2632
202
        }
2633
2634
226
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
226
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
226
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
226
        for (const auto& id : addModuleIDs) {
2639
54
            operations.push_back({ modules.at(id), operations[0].second});
2640
54
        }
2641
226
    }
2642
226
#endif
2643
2644
226
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
226
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
482
    for (size_t i = 0; i < operations.size(); i++) {
2652
256
        auto& operation = operations[i];
2653
2654
256
        auto& module = operation.first;
2655
256
        auto& op = operation.second;
2656
2657
256
        if ( i > 0 ) {
2658
182
            auto& prevModule = operations[i-1].first;
2659
182
            auto& prevOp = operations[i].second;
2660
2661
182
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
96
                auto& curModifier = op.modifier.GetVectorPtr();
2663
96
                if ( curModifier.size() == 0 ) {
2664
23.0k
                    for (size_t j = 0; j < 512; j++) {
2665
23.0k
                        curModifier.push_back(1);
2666
23.0k
                    }
2667
51
                } else {
2668
1.18k
                    for (auto& c : curModifier) {
2669
1.18k
                        c++;
2670
1.18k
                    }
2671
51
                }
2672
96
            }
2673
182
        }
2674
2675
256
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
256
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
256
        const auto& result = results.back();
2682
2683
256
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
256
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
256
        if ( options.disableTests == false ) {
2701
256
            tests::test(op, result.second);
2702
256
        }
2703
2704
256
        postprocess(module, op, result);
2705
256
    }
2706
2707
226
    if ( options.noCompare == false ) {
2708
74
        compare(operations, results, data, size);
2709
74
    }
2710
226
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
293
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
293
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
293
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.97k
    do {
2596
4.97k
        auto op = getOp(&parentDs, data, size);
2597
4.97k
        auto module = getModule(parentDs);
2598
4.97k
        if ( module == nullptr ) {
2599
4.57k
            continue;
2600
4.57k
        }
2601
2602
396
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
396
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
4.96k
    } while ( parentDs.Get<bool>() == true );
2609
2610
293
    if ( operations.empty() == true ) {
2611
37
        return;
2612
37
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
256
#if 1
2616
256
    {
2617
256
        std::set<uint64_t> moduleIDs;
2618
256
        for (const auto& m : modules ) {
2619
146
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
146
            moduleIDs.insert(moduleID);
2627
146
        }
2628
2629
256
        std::set<uint64_t> operationModuleIDs;
2630
256
        for (const auto& op : operations) {
2631
197
            operationModuleIDs.insert(op.first->ID);
2632
197
        }
2633
2634
256
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
256
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
256
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
256
        for (const auto& id : addModuleIDs) {
2639
50
            operations.push_back({ modules.at(id), operations[0].second});
2640
50
        }
2641
256
    }
2642
256
#endif
2643
2644
256
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
256
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
503
    for (size_t i = 0; i < operations.size(); i++) {
2652
247
        auto& operation = operations[i];
2653
2654
247
        auto& module = operation.first;
2655
247
        auto& op = operation.second;
2656
2657
247
        if ( i > 0 ) {
2658
174
            auto& prevModule = operations[i-1].first;
2659
174
            auto& prevOp = operations[i].second;
2660
2661
174
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
87
                auto& curModifier = op.modifier.GetVectorPtr();
2663
87
                if ( curModifier.size() == 0 ) {
2664
22.5k
                    for (size_t j = 0; j < 512; j++) {
2665
22.5k
                        curModifier.push_back(1);
2666
22.5k
                    }
2667
44
                } else {
2668
653
                    for (auto& c : curModifier) {
2669
653
                        c++;
2670
653
                    }
2671
43
                }
2672
87
            }
2673
174
        }
2674
2675
247
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
247
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
247
        const auto& result = results.back();
2682
2683
247
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
247
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
247
        if ( options.disableTests == false ) {
2701
247
            tests::test(op, result.second);
2702
247
        }
2703
2704
247
        postprocess(module, op, result);
2705
247
    }
2706
2707
256
    if ( options.noCompare == false ) {
2708
73
        compare(operations, results, data, size);
2709
73
    }
2710
256
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
271
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
271
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
271
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.51k
    do {
2596
4.51k
        auto op = getOp(&parentDs, data, size);
2597
4.51k
        auto module = getModule(parentDs);
2598
4.51k
        if ( module == nullptr ) {
2599
4.11k
            continue;
2600
4.11k
        }
2601
2602
400
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
400
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
17
            break;
2607
17
        }
2608
4.49k
    } while ( parentDs.Get<bool>() == true );
2609
2610
271
    if ( operations.empty() == true ) {
2611
45
        return;
2612
45
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
226
#if 1
2616
226
    {
2617
226
        std::set<uint64_t> moduleIDs;
2618
226
        for (const auto& m : modules ) {
2619
174
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
174
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
174
            moduleIDs.insert(moduleID);
2627
174
        }
2628
2629
226
        std::set<uint64_t> operationModuleIDs;
2630
244
        for (const auto& op : operations) {
2631
244
            operationModuleIDs.insert(op.first->ID);
2632
244
        }
2633
2634
226
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
226
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
226
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
226
        for (const auto& id : addModuleIDs) {
2639
62
            operations.push_back({ modules.at(id), operations[0].second});
2640
62
        }
2641
226
    }
2642
226
#endif
2643
2644
226
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
226
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
532
    for (size_t i = 0; i < operations.size(); i++) {
2652
306
        auto& operation = operations[i];
2653
2654
306
        auto& module = operation.first;
2655
306
        auto& op = operation.second;
2656
2657
306
        if ( i > 0 ) {
2658
219
            auto& prevModule = operations[i-1].first;
2659
219
            auto& prevOp = operations[i].second;
2660
2661
219
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
120
                auto& curModifier = op.modifier.GetVectorPtr();
2663
120
                if ( curModifier.size() == 0 ) {
2664
31.8k
                    for (size_t j = 0; j < 512; j++) {
2665
31.7k
                        curModifier.push_back(1);
2666
31.7k
                    }
2667
62
                } else {
2668
1.09k
                    for (auto& c : curModifier) {
2669
1.09k
                        c++;
2670
1.09k
                    }
2671
58
                }
2672
120
            }
2673
219
        }
2674
2675
306
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
306
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
306
        const auto& result = results.back();
2682
2683
306
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
306
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
306
        if ( options.disableTests == false ) {
2701
306
            tests::test(op, result.second);
2702
306
        }
2703
2704
306
        postprocess(module, op, result);
2705
306
    }
2706
2707
226
    if ( options.noCompare == false ) {
2708
87
        compare(operations, results, data, size);
2709
87
    }
2710
226
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.07k
    do {
2596
4.07k
        auto op = getOp(&parentDs, data, size);
2597
4.07k
        auto module = getModule(parentDs);
2598
4.07k
        if ( module == nullptr ) {
2599
3.70k
            continue;
2600
3.70k
        }
2601
2602
370
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
370
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
4.06k
    } while ( parentDs.Get<bool>() == true );
2609
2610
221
    if ( operations.empty() == true ) {
2611
16
        return;
2612
16
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
205
#if 1
2616
205
    {
2617
205
        std::set<uint64_t> moduleIDs;
2618
205
        for (const auto& m : modules ) {
2619
138
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
138
            moduleIDs.insert(moduleID);
2627
138
        }
2628
2629
205
        std::set<uint64_t> operationModuleIDs;
2630
206
        for (const auto& op : operations) {
2631
206
            operationModuleIDs.insert(op.first->ID);
2632
206
        }
2633
2634
205
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
205
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
205
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
205
        for (const auto& id : addModuleIDs) {
2639
42
            operations.push_back({ modules.at(id), operations[0].second});
2640
42
        }
2641
205
    }
2642
205
#endif
2643
2644
205
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
205
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
453
    for (size_t i = 0; i < operations.size(); i++) {
2652
248
        auto& operation = operations[i];
2653
2654
248
        auto& module = operation.first;
2655
248
        auto& op = operation.second;
2656
2657
248
        if ( i > 0 ) {
2658
179
            auto& prevModule = operations[i-1].first;
2659
179
            auto& prevOp = operations[i].second;
2660
2661
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
97
                auto& curModifier = op.modifier.GetVectorPtr();
2663
97
                if ( curModifier.size() == 0 ) {
2664
20.0k
                    for (size_t j = 0; j < 512; j++) {
2665
19.9k
                        curModifier.push_back(1);
2666
19.9k
                    }
2667
58
                } else {
2668
561
                    for (auto& c : curModifier) {
2669
561
                        c++;
2670
561
                    }
2671
58
                }
2672
97
            }
2673
179
        }
2674
2675
248
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
248
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
248
        const auto& result = results.back();
2682
2683
248
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
248
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
248
        if ( options.disableTests == false ) {
2701
248
            tests::test(op, result.second);
2702
248
        }
2703
2704
248
        postprocess(module, op, result);
2705
248
    }
2706
2707
205
    if ( options.noCompare == false ) {
2708
69
        compare(operations, results, data, size);
2709
69
    }
2710
205
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.47k
    do {
2596
3.47k
        auto op = getOp(&parentDs, data, size);
2597
3.47k
        auto module = getModule(parentDs);
2598
3.47k
        if ( module == nullptr ) {
2599
3.11k
            continue;
2600
3.11k
        }
2601
2602
357
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
357
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
11
            break;
2607
11
        }
2608
3.45k
    } while ( parentDs.Get<bool>() == true );
2609
2610
221
    if ( operations.empty() == true ) {
2611
24
        return;
2612
24
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
197
#if 1
2616
197
    {
2617
197
        std::set<uint64_t> moduleIDs;
2618
197
        for (const auto& m : modules ) {
2619
144
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
144
            moduleIDs.insert(moduleID);
2627
144
        }
2628
2629
197
        std::set<uint64_t> operationModuleIDs;
2630
198
        for (const auto& op : operations) {
2631
198
            operationModuleIDs.insert(op.first->ID);
2632
198
        }
2633
2634
197
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
197
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
197
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
197
        for (const auto& id : addModuleIDs) {
2639
49
            operations.push_back({ modules.at(id), operations[0].second});
2640
49
        }
2641
197
    }
2642
197
#endif
2643
2644
197
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
197
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
444
    for (size_t i = 0; i < operations.size(); i++) {
2652
247
        auto& operation = operations[i];
2653
2654
247
        auto& module = operation.first;
2655
247
        auto& op = operation.second;
2656
2657
247
        if ( i > 0 ) {
2658
175
            auto& prevModule = operations[i-1].first;
2659
175
            auto& prevOp = operations[i].second;
2660
2661
175
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
91
                auto& curModifier = op.modifier.GetVectorPtr();
2663
91
                if ( curModifier.size() == 0 ) {
2664
19.4k
                    for (size_t j = 0; j < 512; j++) {
2665
19.4k
                        curModifier.push_back(1);
2666
19.4k
                    }
2667
53
                } else {
2668
1.39k
                    for (auto& c : curModifier) {
2669
1.39k
                        c++;
2670
1.39k
                    }
2671
53
                }
2672
91
            }
2673
175
        }
2674
2675
247
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
247
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
247
        const auto& result = results.back();
2682
2683
247
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
247
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
247
        if ( options.disableTests == false ) {
2701
247
            tests::test(op, result.second);
2702
247
        }
2703
2704
247
        postprocess(module, op, result);
2705
247
    }
2706
2707
197
    if ( options.noCompare == false ) {
2708
72
        compare(operations, results, data, size);
2709
72
    }
2710
197
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
262
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
262
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
262
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.29k
    do {
2596
4.29k
        auto op = getOp(&parentDs, data, size);
2597
4.29k
        auto module = getModule(parentDs);
2598
4.29k
        if ( module == nullptr ) {
2599
3.87k
            continue;
2600
3.87k
        }
2601
2602
424
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
424
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
4.28k
    } while ( parentDs.Get<bool>() == true );
2609
2610
262
    if ( operations.empty() == true ) {
2611
21
        return;
2612
21
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
241
#if 1
2616
241
    {
2617
241
        std::set<uint64_t> moduleIDs;
2618
241
        for (const auto& m : modules ) {
2619
194
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
194
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
194
            moduleIDs.insert(moduleID);
2627
194
        }
2628
2629
241
        std::set<uint64_t> operationModuleIDs;
2630
241
        for (const auto& op : operations) {
2631
232
            operationModuleIDs.insert(op.first->ID);
2632
232
        }
2633
2634
241
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
241
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
241
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
241
        for (const auto& id : addModuleIDs) {
2639
75
            operations.push_back({ modules.at(id), operations[0].second});
2640
75
        }
2641
241
    }
2642
241
#endif
2643
2644
241
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
241
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
548
    for (size_t i = 0; i < operations.size(); i++) {
2652
307
        auto& operation = operations[i];
2653
2654
307
        auto& module = operation.first;
2655
307
        auto& op = operation.second;
2656
2657
307
        if ( i > 0 ) {
2658
210
            auto& prevModule = operations[i-1].first;
2659
210
            auto& prevOp = operations[i].second;
2660
2661
210
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
98
                auto& curModifier = op.modifier.GetVectorPtr();
2663
98
                if ( curModifier.size() == 0 ) {
2664
25.6k
                    for (size_t j = 0; j < 512; j++) {
2665
25.6k
                        curModifier.push_back(1);
2666
25.6k
                    }
2667
50
                } else {
2668
662
                    for (auto& c : curModifier) {
2669
662
                        c++;
2670
662
                    }
2671
48
                }
2672
98
            }
2673
210
        }
2674
2675
307
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
307
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
307
        const auto& result = results.back();
2682
2683
307
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
307
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
307
        if ( options.disableTests == false ) {
2701
307
            tests::test(op, result.second);
2702
307
        }
2703
2704
307
        postprocess(module, op, result);
2705
307
    }
2706
2707
241
    if ( options.noCompare == false ) {
2708
97
        compare(operations, results, data, size);
2709
97
    }
2710
241
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
296
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
296
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
296
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.96k
    do {
2596
4.96k
        auto op = getOp(&parentDs, data, size);
2597
4.96k
        auto module = getModule(parentDs);
2598
4.96k
        if ( module == nullptr ) {
2599
4.58k
            continue;
2600
4.58k
        }
2601
2602
385
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
385
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
4.95k
    } while ( parentDs.Get<bool>() == true );
2609
2610
296
    if ( operations.empty() == true ) {
2611
42
        return;
2612
42
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
254
#if 1
2616
254
    {
2617
254
        std::set<uint64_t> moduleIDs;
2618
254
        for (const auto& m : modules ) {
2619
164
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
164
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
164
            moduleIDs.insert(moduleID);
2627
164
        }
2628
2629
254
        std::set<uint64_t> operationModuleIDs;
2630
254
        for (const auto& op : operations) {
2631
225
            operationModuleIDs.insert(op.first->ID);
2632
225
        }
2633
2634
254
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
254
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
254
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
254
        for (const auto& id : addModuleIDs) {
2639
59
            operations.push_back({ modules.at(id), operations[0].second});
2640
59
        }
2641
254
    }
2642
254
#endif
2643
2644
254
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
254
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
538
    for (size_t i = 0; i < operations.size(); i++) {
2652
284
        auto& operation = operations[i];
2653
2654
284
        auto& module = operation.first;
2655
284
        auto& op = operation.second;
2656
2657
284
        if ( i > 0 ) {
2658
202
            auto& prevModule = operations[i-1].first;
2659
202
            auto& prevOp = operations[i].second;
2660
2661
202
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
108
                auto& curModifier = op.modifier.GetVectorPtr();
2663
108
                if ( curModifier.size() == 0 ) {
2664
23.0k
                    for (size_t j = 0; j < 512; j++) {
2665
23.0k
                        curModifier.push_back(1);
2666
23.0k
                    }
2667
63
                } else {
2668
560
                    for (auto& c : curModifier) {
2669
560
                        c++;
2670
560
                    }
2671
63
                }
2672
108
            }
2673
202
        }
2674
2675
284
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
284
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
284
        const auto& result = results.back();
2682
2683
284
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
284
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
284
        if ( options.disableTests == false ) {
2701
284
            tests::test(op, result.second);
2702
284
        }
2703
2704
284
        postprocess(module, op, result);
2705
284
    }
2706
2707
254
    if ( options.noCompare == false ) {
2708
82
        compare(operations, results, data, size);
2709
82
    }
2710
254
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
225
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
225
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
225
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.90k
    do {
2596
3.90k
        auto op = getOp(&parentDs, data, size);
2597
3.90k
        auto module = getModule(parentDs);
2598
3.90k
        if ( module == nullptr ) {
2599
3.58k
            continue;
2600
3.58k
        }
2601
2602
317
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
317
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
3.88k
    } while ( parentDs.Get<bool>() == true );
2609
2610
225
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
206
#if 1
2616
206
    {
2617
206
        std::set<uint64_t> moduleIDs;
2618
206
        for (const auto& m : modules ) {
2619
126
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
126
            moduleIDs.insert(moduleID);
2627
126
        }
2628
2629
206
        std::set<uint64_t> operationModuleIDs;
2630
206
        for (const auto& op : operations) {
2631
188
            operationModuleIDs.insert(op.first->ID);
2632
188
        }
2633
2634
206
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
206
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
206
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
206
        for (const auto& id : addModuleIDs) {
2639
39
            operations.push_back({ modules.at(id), operations[0].second});
2640
39
        }
2641
206
    }
2642
206
#endif
2643
2644
206
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
206
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
433
    for (size_t i = 0; i < operations.size(); i++) {
2652
227
        auto& operation = operations[i];
2653
2654
227
        auto& module = operation.first;
2655
227
        auto& op = operation.second;
2656
2657
227
        if ( i > 0 ) {
2658
164
            auto& prevModule = operations[i-1].first;
2659
164
            auto& prevOp = operations[i].second;
2660
2661
164
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
88
                auto& curModifier = op.modifier.GetVectorPtr();
2663
88
                if ( curModifier.size() == 0 ) {
2664
24.6k
                    for (size_t j = 0; j < 512; j++) {
2665
24.5k
                        curModifier.push_back(1);
2666
24.5k
                    }
2667
48
                } else {
2668
588
                    for (auto& c : curModifier) {
2669
588
                        c++;
2670
588
                    }
2671
40
                }
2672
88
            }
2673
164
        }
2674
2675
227
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
227
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
227
        const auto& result = results.back();
2682
2683
227
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
227
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
227
        if ( options.disableTests == false ) {
2701
227
            tests::test(op, result.second);
2702
227
        }
2703
2704
227
        postprocess(module, op, result);
2705
227
    }
2706
2707
206
    if ( options.noCompare == false ) {
2708
63
        compare(operations, results, data, size);
2709
63
    }
2710
206
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
331
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
331
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
331
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.84k
    do {
2596
3.84k
        auto op = getOp(&parentDs, data, size);
2597
3.84k
        auto module = getModule(parentDs);
2598
3.84k
        if ( module == nullptr ) {
2599
3.48k
            continue;
2600
3.48k
        }
2601
2602
358
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
358
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
3.83k
    } while ( parentDs.Get<bool>() == true );
2609
2610
331
    if ( operations.empty() == true ) {
2611
64
        return;
2612
64
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
267
#if 1
2616
267
    {
2617
267
        std::set<uint64_t> moduleIDs;
2618
267
        for (const auto& m : modules ) {
2619
138
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
138
            moduleIDs.insert(moduleID);
2627
138
        }
2628
2629
267
        std::set<uint64_t> operationModuleIDs;
2630
267
        for (const auto& op : operations) {
2631
196
            operationModuleIDs.insert(op.first->ID);
2632
196
        }
2633
2634
267
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
267
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
267
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
267
        for (const auto& id : addModuleIDs) {
2639
44
            operations.push_back({ modules.at(id), operations[0].second});
2640
44
        }
2641
267
    }
2642
267
#endif
2643
2644
267
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
267
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
507
    for (size_t i = 0; i < operations.size(); i++) {
2652
240
        auto& operation = operations[i];
2653
2654
240
        auto& module = operation.first;
2655
240
        auto& op = operation.second;
2656
2657
240
        if ( i > 0 ) {
2658
171
            auto& prevModule = operations[i-1].first;
2659
171
            auto& prevOp = operations[i].second;
2660
2661
171
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
89
                auto& curModifier = op.modifier.GetVectorPtr();
2663
89
                if ( curModifier.size() == 0 ) {
2664
19.4k
                    for (size_t j = 0; j < 512; j++) {
2665
19.4k
                        curModifier.push_back(1);
2666
19.4k
                    }
2667
51
                } else {
2668
591
                    for (auto& c : curModifier) {
2669
591
                        c++;
2670
591
                    }
2671
51
                }
2672
89
            }
2673
171
        }
2674
2675
240
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
240
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
240
        const auto& result = results.back();
2682
2683
240
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
240
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
240
        if ( options.disableTests == false ) {
2701
240
            tests::test(op, result.second);
2702
240
        }
2703
2704
240
        postprocess(module, op, result);
2705
240
    }
2706
2707
267
    if ( options.noCompare == false ) {
2708
69
        compare(operations, results, data, size);
2709
69
    }
2710
267
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
249
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
249
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
249
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.44k
    do {
2596
3.44k
        auto op = getOp(&parentDs, data, size);
2597
3.44k
        auto module = getModule(parentDs);
2598
3.44k
        if ( module == nullptr ) {
2599
3.10k
            continue;
2600
3.10k
        }
2601
2602
346
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
346
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
3.43k
    } while ( parentDs.Get<bool>() == true );
2609
2610
249
    if ( operations.empty() == true ) {
2611
41
        return;
2612
41
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
208
#if 1
2616
208
    {
2617
208
        std::set<uint64_t> moduleIDs;
2618
208
        for (const auto& m : modules ) {
2619
124
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
124
            moduleIDs.insert(moduleID);
2627
124
        }
2628
2629
208
        std::set<uint64_t> operationModuleIDs;
2630
208
        for (const auto& op : operations) {
2631
186
            operationModuleIDs.insert(op.first->ID);
2632
186
        }
2633
2634
208
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
208
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
208
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
208
        for (const auto& id : addModuleIDs) {
2639
39
            operations.push_back({ modules.at(id), operations[0].second});
2640
39
        }
2641
208
    }
2642
208
#endif
2643
2644
208
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
208
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
433
    for (size_t i = 0; i < operations.size(); i++) {
2652
225
        auto& operation = operations[i];
2653
2654
225
        auto& module = operation.first;
2655
225
        auto& op = operation.second;
2656
2657
225
        if ( i > 0 ) {
2658
163
            auto& prevModule = operations[i-1].first;
2659
163
            auto& prevOp = operations[i].second;
2660
2661
163
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
87
                auto& curModifier = op.modifier.GetVectorPtr();
2663
87
                if ( curModifier.size() == 0 ) {
2664
17.4k
                    for (size_t j = 0; j < 512; j++) {
2665
17.4k
                        curModifier.push_back(1);
2666
17.4k
                    }
2667
53
                } else {
2668
823
                    for (auto& c : curModifier) {
2669
823
                        c++;
2670
823
                    }
2671
53
                }
2672
87
            }
2673
163
        }
2674
2675
225
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
225
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
225
        const auto& result = results.back();
2682
2683
225
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
225
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
225
        if ( options.disableTests == false ) {
2701
225
            tests::test(op, result.second);
2702
225
        }
2703
2704
225
        postprocess(module, op, result);
2705
225
    }
2706
2707
208
    if ( options.noCompare == false ) {
2708
62
        compare(operations, results, data, size);
2709
62
    }
2710
208
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
224
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
224
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
224
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.90k
    do {
2596
3.90k
        auto op = getOp(&parentDs, data, size);
2597
3.90k
        auto module = getModule(parentDs);
2598
3.90k
        if ( module == nullptr ) {
2599
3.53k
            continue;
2600
3.53k
        }
2601
2602
367
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
367
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
3.89k
    } while ( parentDs.Get<bool>() == true );
2609
2610
224
    if ( operations.empty() == true ) {
2611
13
        return;
2612
13
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
211
#if 1
2616
211
    {
2617
211
        std::set<uint64_t> moduleIDs;
2618
211
        for (const auto& m : modules ) {
2619
136
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
136
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
136
            moduleIDs.insert(moduleID);
2627
136
        }
2628
2629
211
        std::set<uint64_t> operationModuleIDs;
2630
213
        for (const auto& op : operations) {
2631
213
            operationModuleIDs.insert(op.first->ID);
2632
213
        }
2633
2634
211
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
211
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
211
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
211
        for (const auto& id : addModuleIDs) {
2639
45
            operations.push_back({ modules.at(id), operations[0].second});
2640
45
        }
2641
211
    }
2642
211
#endif
2643
2644
211
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
211
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
469
    for (size_t i = 0; i < operations.size(); i++) {
2652
258
        auto& operation = operations[i];
2653
2654
258
        auto& module = operation.first;
2655
258
        auto& op = operation.second;
2656
2657
258
        if ( i > 0 ) {
2658
190
            auto& prevModule = operations[i-1].first;
2659
190
            auto& prevOp = operations[i].second;
2660
2661
190
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
101
                auto& curModifier = op.modifier.GetVectorPtr();
2663
101
                if ( curModifier.size() == 0 ) {
2664
28.2k
                    for (size_t j = 0; j < 512; j++) {
2665
28.1k
                        curModifier.push_back(1);
2666
28.1k
                    }
2667
55
                } else {
2668
903
                    for (auto& c : curModifier) {
2669
903
                        c++;
2670
903
                    }
2671
46
                }
2672
101
            }
2673
190
        }
2674
2675
258
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
258
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
258
        const auto& result = results.back();
2682
2683
258
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
258
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
258
        if ( options.disableTests == false ) {
2701
258
            tests::test(op, result.second);
2702
258
        }
2703
2704
258
        postprocess(module, op, result);
2705
258
    }
2706
2707
211
    if ( options.noCompare == false ) {
2708
68
        compare(operations, results, data, size);
2709
68
    }
2710
211
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
246
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
246
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
246
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.87k
    do {
2596
3.87k
        auto op = getOp(&parentDs, data, size);
2597
3.87k
        auto module = getModule(parentDs);
2598
3.87k
        if ( module == nullptr ) {
2599
3.46k
            continue;
2600
3.46k
        }
2601
2602
413
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
413
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
11
            break;
2607
11
        }
2608
3.86k
    } while ( parentDs.Get<bool>() == true );
2609
2610
246
    if ( operations.empty() == true ) {
2611
17
        return;
2612
17
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
229
#if 1
2616
229
    {
2617
229
        std::set<uint64_t> moduleIDs;
2618
229
        for (const auto& m : modules ) {
2619
202
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
202
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
202
            moduleIDs.insert(moduleID);
2627
202
        }
2628
2629
229
        std::set<uint64_t> operationModuleIDs;
2630
253
        for (const auto& op : operations) {
2631
253
            operationModuleIDs.insert(op.first->ID);
2632
253
        }
2633
2634
229
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
229
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
229
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
229
        for (const auto& id : addModuleIDs) {
2639
75
            operations.push_back({ modules.at(id), operations[0].second});
2640
75
        }
2641
229
    }
2642
229
#endif
2643
2644
229
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
229
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
557
    for (size_t i = 0; i < operations.size(); i++) {
2652
328
        auto& operation = operations[i];
2653
2654
328
        auto& module = operation.first;
2655
328
        auto& op = operation.second;
2656
2657
328
        if ( i > 0 ) {
2658
227
            auto& prevModule = operations[i-1].first;
2659
227
            auto& prevOp = operations[i].second;
2660
2661
227
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
110
                auto& curModifier = op.modifier.GetVectorPtr();
2663
110
                if ( curModifier.size() == 0 ) {
2664
33.8k
                    for (size_t j = 0; j < 512; j++) {
2665
33.7k
                        curModifier.push_back(1);
2666
33.7k
                    }
2667
66
                } else {
2668
878
                    for (auto& c : curModifier) {
2669
878
                        c++;
2670
878
                    }
2671
44
                }
2672
110
            }
2673
227
        }
2674
2675
328
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
328
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
328
        const auto& result = results.back();
2682
2683
328
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
328
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
328
        if ( options.disableTests == false ) {
2701
328
            tests::test(op, result.second);
2702
328
        }
2703
2704
328
        postprocess(module, op, result);
2705
328
    }
2706
2707
229
    if ( options.noCompare == false ) {
2708
101
        compare(operations, results, data, size);
2709
101
    }
2710
229
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
228
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
228
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
228
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.72k
    do {
2596
3.72k
        auto op = getOp(&parentDs, data, size);
2597
3.72k
        auto module = getModule(parentDs);
2598
3.72k
        if ( module == nullptr ) {
2599
3.36k
            continue;
2600
3.36k
        }
2601
2602
358
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
358
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
13
            break;
2607
13
        }
2608
3.71k
    } while ( parentDs.Get<bool>() == true );
2609
2610
228
    if ( operations.empty() == true ) {
2611
23
        return;
2612
23
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
205
#if 1
2616
205
    {
2617
205
        std::set<uint64_t> moduleIDs;
2618
205
        for (const auto& m : modules ) {
2619
158
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
158
            moduleIDs.insert(moduleID);
2627
158
        }
2628
2629
205
        std::set<uint64_t> operationModuleIDs;
2630
205
        for (const auto& op : operations) {
2631
203
            operationModuleIDs.insert(op.first->ID);
2632
203
        }
2633
2634
205
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
205
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
205
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
205
        for (const auto& id : addModuleIDs) {
2639
55
            operations.push_back({ modules.at(id), operations[0].second});
2640
55
        }
2641
205
    }
2642
205
#endif
2643
2644
205
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
205
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
463
    for (size_t i = 0; i < operations.size(); i++) {
2652
258
        auto& operation = operations[i];
2653
2654
258
        auto& module = operation.first;
2655
258
        auto& op = operation.second;
2656
2657
258
        if ( i > 0 ) {
2658
179
            auto& prevModule = operations[i-1].first;
2659
179
            auto& prevOp = operations[i].second;
2660
2661
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
86
                auto& curModifier = op.modifier.GetVectorPtr();
2663
86
                if ( curModifier.size() == 0 ) {
2664
21.5k
                    for (size_t j = 0; j < 512; j++) {
2665
21.5k
                        curModifier.push_back(1);
2666
21.5k
                    }
2667
44
                } else {
2668
623
                    for (auto& c : curModifier) {
2669
623
                        c++;
2670
623
                    }
2671
44
                }
2672
86
            }
2673
179
        }
2674
2675
258
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
258
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
258
        const auto& result = results.back();
2682
2683
258
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
258
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
258
        if ( options.disableTests == false ) {
2701
258
            tests::test(op, result.second);
2702
258
        }
2703
2704
258
        postprocess(module, op, result);
2705
258
    }
2706
2707
205
    if ( options.noCompare == false ) {
2708
79
        compare(operations, results, data, size);
2709
79
    }
2710
205
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
336
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
336
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
336
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.04k
    do {
2596
5.04k
        auto op = getOp(&parentDs, data, size);
2597
5.04k
        auto module = getModule(parentDs);
2598
5.04k
        if ( module == nullptr ) {
2599
4.58k
            continue;
2600
4.58k
        }
2601
2602
462
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
462
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
16
            break;
2607
16
        }
2608
5.02k
    } while ( parentDs.Get<bool>() == true );
2609
2610
336
    if ( operations.empty() == true ) {
2611
37
        return;
2612
37
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
299
#if 1
2616
299
    {
2617
299
        std::set<uint64_t> moduleIDs;
2618
299
        for (const auto& m : modules ) {
2619
198
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
198
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
198
            moduleIDs.insert(moduleID);
2627
198
        }
2628
2629
299
        std::set<uint64_t> operationModuleIDs;
2630
299
        for (const auto& op : operations) {
2631
250
            operationModuleIDs.insert(op.first->ID);
2632
250
        }
2633
2634
299
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
299
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
299
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
299
        for (const auto& id : addModuleIDs) {
2639
72
            operations.push_back({ modules.at(id), operations[0].second});
2640
72
        }
2641
299
    }
2642
299
#endif
2643
2644
299
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
299
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
621
    for (size_t i = 0; i < operations.size(); i++) {
2652
322
        auto& operation = operations[i];
2653
2654
322
        auto& module = operation.first;
2655
322
        auto& op = operation.second;
2656
2657
322
        if ( i > 0 ) {
2658
223
            auto& prevModule = operations[i-1].first;
2659
223
            auto& prevOp = operations[i].second;
2660
2661
223
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
112
                auto& curModifier = op.modifier.GetVectorPtr();
2663
112
                if ( curModifier.size() == 0 ) {
2664
26.6k
                    for (size_t j = 0; j < 512; j++) {
2665
26.6k
                        curModifier.push_back(1);
2666
26.6k
                    }
2667
60
                } else {
2668
551
                    for (auto& c : curModifier) {
2669
551
                        c++;
2670
551
                    }
2671
60
                }
2672
112
            }
2673
223
        }
2674
2675
322
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
322
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
322
        const auto& result = results.back();
2682
2683
322
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
322
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
322
        if ( options.disableTests == false ) {
2701
322
            tests::test(op, result.second);
2702
322
        }
2703
2704
322
        postprocess(module, op, result);
2705
322
    }
2706
2707
299
    if ( options.noCompare == false ) {
2708
99
        compare(operations, results, data, size);
2709
99
    }
2710
299
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
251
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
251
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
251
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.61k
    do {
2596
3.61k
        auto op = getOp(&parentDs, data, size);
2597
3.61k
        auto module = getModule(parentDs);
2598
3.61k
        if ( module == nullptr ) {
2599
3.24k
            continue;
2600
3.24k
        }
2601
2602
362
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
362
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
3.59k
    } while ( parentDs.Get<bool>() == true );
2609
2610
251
    if ( operations.empty() == true ) {
2611
32
        return;
2612
32
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
219
#if 1
2616
219
    {
2617
219
        std::set<uint64_t> moduleIDs;
2618
219
        for (const auto& m : modules ) {
2619
170
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
170
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
170
            moduleIDs.insert(moduleID);
2627
170
        }
2628
2629
219
        std::set<uint64_t> operationModuleIDs;
2630
219
        for (const auto& op : operations) {
2631
218
            operationModuleIDs.insert(op.first->ID);
2632
218
        }
2633
2634
219
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
219
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
219
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
219
        for (const auto& id : addModuleIDs) {
2639
63
            operations.push_back({ modules.at(id), operations[0].second});
2640
63
        }
2641
219
    }
2642
219
#endif
2643
2644
219
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
219
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
500
    for (size_t i = 0; i < operations.size(); i++) {
2652
281
        auto& operation = operations[i];
2653
2654
281
        auto& module = operation.first;
2655
281
        auto& op = operation.second;
2656
2657
281
        if ( i > 0 ) {
2658
196
            auto& prevModule = operations[i-1].first;
2659
196
            auto& prevOp = operations[i].second;
2660
2661
196
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
99
                auto& curModifier = op.modifier.GetVectorPtr();
2663
99
                if ( curModifier.size() == 0 ) {
2664
22.5k
                    for (size_t j = 0; j < 512; j++) {
2665
22.5k
                        curModifier.push_back(1);
2666
22.5k
                    }
2667
55
                } else {
2668
674
                    for (auto& c : curModifier) {
2669
674
                        c++;
2670
674
                    }
2671
55
                }
2672
99
            }
2673
196
        }
2674
2675
281
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
281
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
281
        const auto& result = results.back();
2682
2683
281
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
281
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
281
        if ( options.disableTests == false ) {
2701
281
            tests::test(op, result.second);
2702
281
        }
2703
2704
281
        postprocess(module, op, result);
2705
281
    }
2706
2707
219
    if ( options.noCompare == false ) {
2708
85
        compare(operations, results, data, size);
2709
85
    }
2710
219
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
330
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
330
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
330
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.34k
    do {
2596
4.34k
        auto op = getOp(&parentDs, data, size);
2597
4.34k
        auto module = getModule(parentDs);
2598
4.34k
        if ( module == nullptr ) {
2599
3.83k
            continue;
2600
3.83k
        }
2601
2602
506
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
506
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
4.33k
    } while ( parentDs.Get<bool>() == true );
2609
2610
330
    if ( operations.empty() == true ) {
2611
25
        return;
2612
25
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
305
#if 1
2616
305
    {
2617
305
        std::set<uint64_t> moduleIDs;
2618
305
        for (const auto& m : modules ) {
2619
300
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
300
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
300
            moduleIDs.insert(moduleID);
2627
300
        }
2628
2629
305
        std::set<uint64_t> operationModuleIDs;
2630
326
        for (const auto& op : operations) {
2631
326
            operationModuleIDs.insert(op.first->ID);
2632
326
        }
2633
2634
305
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
305
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
305
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
305
        for (const auto& id : addModuleIDs) {
2639
124
            operations.push_back({ modules.at(id), operations[0].second});
2640
124
        }
2641
305
    }
2642
305
#endif
2643
2644
305
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
305
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
755
    for (size_t i = 0; i < operations.size(); i++) {
2652
450
        auto& operation = operations[i];
2653
2654
450
        auto& module = operation.first;
2655
450
        auto& op = operation.second;
2656
2657
450
        if ( i > 0 ) {
2658
300
            auto& prevModule = operations[i-1].first;
2659
300
            auto& prevOp = operations[i].second;
2660
2661
300
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
131
                auto& curModifier = op.modifier.GetVectorPtr();
2663
131
                if ( curModifier.size() == 0 ) {
2664
40.0k
                    for (size_t j = 0; j < 512; j++) {
2665
39.9k
                        curModifier.push_back(1);
2666
39.9k
                    }
2667
78
                } else {
2668
831
                    for (auto& c : curModifier) {
2669
831
                        c++;
2670
831
                    }
2671
53
                }
2672
131
            }
2673
300
        }
2674
2675
450
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
450
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
450
        const auto& result = results.back();
2682
2683
450
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
450
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
450
        if ( options.disableTests == false ) {
2701
450
            tests::test(op, result.second);
2702
450
        }
2703
2704
450
        postprocess(module, op, result);
2705
450
    }
2706
2707
305
    if ( options.noCompare == false ) {
2708
150
        compare(operations, results, data, size);
2709
150
    }
2710
305
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
307
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
307
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
307
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
5.30k
    do {
2596
5.30k
        auto op = getOp(&parentDs, data, size);
2597
5.30k
        auto module = getModule(parentDs);
2598
5.30k
        if ( module == nullptr ) {
2599
4.85k
            continue;
2600
4.85k
        }
2601
2602
450
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
450
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
14
            break;
2607
14
        }
2608
5.29k
    } while ( parentDs.Get<bool>() == true );
2609
2610
307
    if ( operations.empty() == true ) {
2611
31
        return;
2612
31
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
276
#if 1
2616
276
    {
2617
276
        std::set<uint64_t> moduleIDs;
2618
276
        for (const auto& m : modules ) {
2619
234
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
234
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
234
            moduleIDs.insert(moduleID);
2627
234
        }
2628
2629
276
        std::set<uint64_t> operationModuleIDs;
2630
276
        for (const auto& op : operations) {
2631
272
            operationModuleIDs.insert(op.first->ID);
2632
272
        }
2633
2634
276
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
276
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
276
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
276
        for (const auto& id : addModuleIDs) {
2639
90
            operations.push_back({ modules.at(id), operations[0].second});
2640
90
        }
2641
276
    }
2642
276
#endif
2643
2644
276
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
276
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
638
    for (size_t i = 0; i < operations.size(); i++) {
2652
362
        auto& operation = operations[i];
2653
2654
362
        auto& module = operation.first;
2655
362
        auto& op = operation.second;
2656
2657
362
        if ( i > 0 ) {
2658
245
            auto& prevModule = operations[i-1].first;
2659
245
            auto& prevOp = operations[i].second;
2660
2661
245
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
116
                auto& curModifier = op.modifier.GetVectorPtr();
2663
116
                if ( curModifier.size() == 0 ) {
2664
27.1k
                    for (size_t j = 0; j < 512; j++) {
2665
27.1k
                        curModifier.push_back(1);
2666
27.1k
                    }
2667
63
                } else {
2668
744
                    for (auto& c : curModifier) {
2669
744
                        c++;
2670
744
                    }
2671
63
                }
2672
116
            }
2673
245
        }
2674
2675
362
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
362
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
362
        const auto& result = results.back();
2682
2683
362
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
362
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
362
        if ( options.disableTests == false ) {
2701
362
            tests::test(op, result.second);
2702
362
        }
2703
2704
362
        postprocess(module, op, result);
2705
362
    }
2706
2707
276
    if ( options.noCompare == false ) {
2708
117
        compare(operations, results, data, size);
2709
117
    }
2710
276
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
289
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
289
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
289
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.46k
    do {
2596
4.46k
        auto op = getOp(&parentDs, data, size);
2597
4.46k
        auto module = getModule(parentDs);
2598
4.46k
        if ( module == nullptr ) {
2599
3.99k
            continue;
2600
3.99k
        }
2601
2602
475
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
475
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.45k
    } while ( parentDs.Get<bool>() == true );
2609
2610
289
    if ( operations.empty() == true ) {
2611
11
        return;
2612
11
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
278
#if 1
2616
278
    {
2617
278
        std::set<uint64_t> moduleIDs;
2618
278
        for (const auto& m : modules ) {
2619
250
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
250
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
250
            moduleIDs.insert(moduleID);
2627
250
        }
2628
2629
278
        std::set<uint64_t> operationModuleIDs;
2630
295
        for (const auto& op : operations) {
2631
295
            operationModuleIDs.insert(op.first->ID);
2632
295
        }
2633
2634
278
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
278
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
278
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
278
        for (const auto& id : addModuleIDs) {
2639
103
            operations.push_back({ modules.at(id), operations[0].second});
2640
103
        }
2641
278
    }
2642
278
#endif
2643
2644
278
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
278
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
676
    for (size_t i = 0; i < operations.size(); i++) {
2652
398
        auto& operation = operations[i];
2653
2654
398
        auto& module = operation.first;
2655
398
        auto& op = operation.second;
2656
2657
398
        if ( i > 0 ) {
2658
273
            auto& prevModule = operations[i-1].first;
2659
273
            auto& prevOp = operations[i].second;
2660
2661
273
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
132
                auto& curModifier = op.modifier.GetVectorPtr();
2663
132
                if ( curModifier.size() == 0 ) {
2664
35.9k
                    for (size_t j = 0; j < 512; j++) {
2665
35.8k
                        curModifier.push_back(1);
2666
35.8k
                    }
2667
70
                } else {
2668
1.18k
                    for (auto& c : curModifier) {
2669
1.18k
                        c++;
2670
1.18k
                    }
2671
62
                }
2672
132
            }
2673
273
        }
2674
2675
398
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
398
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
398
        const auto& result = results.back();
2682
2683
398
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
398
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
398
        if ( options.disableTests == false ) {
2701
398
            tests::test(op, result.second);
2702
398
        }
2703
2704
398
        postprocess(module, op, result);
2705
398
    }
2706
2707
278
    if ( options.noCompare == false ) {
2708
125
        compare(operations, results, data, size);
2709
125
    }
2710
278
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
323
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
323
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
323
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.55k
    do {
2596
4.55k
        auto op = getOp(&parentDs, data, size);
2597
4.55k
        auto module = getModule(parentDs);
2598
4.55k
        if ( module == nullptr ) {
2599
4.07k
            continue;
2600
4.07k
        }
2601
2602
477
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
477
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
4.53k
    } while ( parentDs.Get<bool>() == true );
2609
2610
323
    if ( operations.empty() == true ) {
2611
19
        return;
2612
19
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
304
#if 1
2616
304
    {
2617
304
        std::set<uint64_t> moduleIDs;
2618
304
        for (const auto& m : modules ) {
2619
226
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
226
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
226
            moduleIDs.insert(moduleID);
2627
226
        }
2628
2629
304
        std::set<uint64_t> operationModuleIDs;
2630
304
        for (const auto& op : operations) {
2631
265
            operationModuleIDs.insert(op.first->ID);
2632
265
        }
2633
2634
304
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
304
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
304
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
304
        for (const auto& id : addModuleIDs) {
2639
92
            operations.push_back({ modules.at(id), operations[0].second});
2640
92
        }
2641
304
    }
2642
304
#endif
2643
2644
304
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
304
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
661
    for (size_t i = 0; i < operations.size(); i++) {
2652
357
        auto& operation = operations[i];
2653
2654
357
        auto& module = operation.first;
2655
357
        auto& op = operation.second;
2656
2657
357
        if ( i > 0 ) {
2658
244
            auto& prevModule = operations[i-1].first;
2659
244
            auto& prevOp = operations[i].second;
2660
2661
244
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
119
                auto& curModifier = op.modifier.GetVectorPtr();
2663
119
                if ( curModifier.size() == 0 ) {
2664
26.6k
                    for (size_t j = 0; j < 512; j++) {
2665
26.6k
                        curModifier.push_back(1);
2666
26.6k
                    }
2667
67
                } else {
2668
967
                    for (auto& c : curModifier) {
2669
967
                        c++;
2670
967
                    }
2671
67
                }
2672
119
            }
2673
244
        }
2674
2675
357
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
357
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
357
        const auto& result = results.back();
2682
2683
357
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
357
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
357
        if ( options.disableTests == false ) {
2701
357
            tests::test(op, result.second);
2702
357
        }
2703
2704
357
        postprocess(module, op, result);
2705
357
    }
2706
2707
304
    if ( options.noCompare == false ) {
2708
113
        compare(operations, results, data, size);
2709
113
    }
2710
304
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
253
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
253
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
253
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
3.15k
    do {
2596
3.15k
        auto op = getOp(&parentDs, data, size);
2597
3.15k
        auto module = getModule(parentDs);
2598
3.15k
        if ( module == nullptr ) {
2599
2.84k
            continue;
2600
2.84k
        }
2601
2602
318
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
318
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
15
            break;
2607
15
        }
2608
3.14k
    } while ( parentDs.Get<bool>() == true );
2609
2610
253
    if ( operations.empty() == true ) {
2611
27
        return;
2612
27
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
226
#if 1
2616
226
    {
2617
226
        std::set<uint64_t> moduleIDs;
2618
226
        for (const auto& m : modules ) {
2619
116
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
116
            moduleIDs.insert(moduleID);
2627
116
        }
2628
2629
226
        std::set<uint64_t> operationModuleIDs;
2630
226
        for (const auto& op : operations) {
2631
186
            operationModuleIDs.insert(op.first->ID);
2632
186
        }
2633
2634
226
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
226
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
226
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
226
        for (const auto& id : addModuleIDs) {
2639
36
            operations.push_back({ modules.at(id), operations[0].second});
2640
36
        }
2641
226
    }
2642
226
#endif
2643
2644
226
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
226
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
448
    for (size_t i = 0; i < operations.size(); i++) {
2652
222
        auto& operation = operations[i];
2653
2654
222
        auto& module = operation.first;
2655
222
        auto& op = operation.second;
2656
2657
222
        if ( i > 0 ) {
2658
164
            auto& prevModule = operations[i-1].first;
2659
164
            auto& prevOp = operations[i].second;
2660
2661
164
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
90
                auto& curModifier = op.modifier.GetVectorPtr();
2663
90
                if ( curModifier.size() == 0 ) {
2664
24.1k
                    for (size_t j = 0; j < 512; j++) {
2665
24.0k
                        curModifier.push_back(1);
2666
24.0k
                    }
2667
47
                } else {
2668
585
                    for (auto& c : curModifier) {
2669
585
                        c++;
2670
585
                    }
2671
43
                }
2672
90
            }
2673
164
        }
2674
2675
222
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
222
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
222
        const auto& result = results.back();
2682
2683
222
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
222
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
222
        if ( options.disableTests == false ) {
2701
222
            tests::test(op, result.second);
2702
222
        }
2703
2704
222
        postprocess(module, op, result);
2705
222
    }
2706
2707
226
    if ( options.noCompare == false ) {
2708
58
        compare(operations, results, data, size);
2709
58
    }
2710
226
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2590
256
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2591
256
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2592
2593
256
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2594
2595
4.43k
    do {
2596
4.43k
        auto op = getOp(&parentDs, data, size);
2597
4.43k
        auto module = getModule(parentDs);
2598
4.43k
        if ( module == nullptr ) {
2599
4.04k
            continue;
2600
4.04k
        }
2601
2602
397
        operations.push_back( {module, op} );
2603
2604
        /* Limit number of operations per run to prevent time-outs */
2605
397
        if ( operations.size() == OperationType::MaxOperations() ) {
2606
12
            break;
2607
12
        }
2608
4.42k
    } while ( parentDs.Get<bool>() == true );
2609
2610
256
    if ( operations.empty() == true ) {
2611
18
        return;
2612
18
    }
2613
2614
    /* Enable this to run every operation on every loaded module */
2615
238
#if 1
2616
238
    {
2617
238
        std::set<uint64_t> moduleIDs;
2618
238
        for (const auto& m : modules ) {
2619
134
            const auto moduleID = m.first;
2620
2621
            /* Skip if this is a disabled module */
2622
134
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2623
0
                continue;
2624
0
            }
2625
2626
134
            moduleIDs.insert(moduleID);
2627
134
        }
2628
2629
238
        std::set<uint64_t> operationModuleIDs;
2630
238
        for (const auto& op : operations) {
2631
199
            operationModuleIDs.insert(op.first->ID);
2632
199
        }
2633
2634
238
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2635
238
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2636
238
        addModuleIDs.resize(it - addModuleIDs.begin());
2637
2638
238
        for (const auto& id : addModuleIDs) {
2639
40
            operations.push_back({ modules.at(id), operations[0].second});
2640
40
        }
2641
238
    }
2642
238
#endif
2643
2644
238
    if ( operations.size() < options.minModules ) {
2645
0
        return;
2646
0
    }
2647
2648
238
    if ( options.debug == true && !operations.empty() ) {
2649
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2650
0
    }
2651
477
    for (size_t i = 0; i < operations.size(); i++) {
2652
239
        auto& operation = operations[i];
2653
2654
239
        auto& module = operation.first;
2655
239
        auto& op = operation.second;
2656
2657
239
        if ( i > 0 ) {
2658
172
            auto& prevModule = operations[i-1].first;
2659
172
            auto& prevOp = operations[i].second;
2660
2661
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2662
89
                auto& curModifier = op.modifier.GetVectorPtr();
2663
89
                if ( curModifier.size() == 0 ) {
2664
22.5k
                    for (size_t j = 0; j < 512; j++) {
2665
22.5k
                        curModifier.push_back(1);
2666
22.5k
                    }
2667
45
                } else {
2668
547
                    for (auto& c : curModifier) {
2669
547
                        c++;
2670
547
                    }
2671
45
                }
2672
89
            }
2673
172
        }
2674
2675
239
        if ( options.debug == true ) {
2676
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2677
0
        }
2678
2679
239
        results.push_back( {module, std::move(callModule(module, op))} );
2680
2681
239
        const auto& result = results.back();
2682
2683
239
        if ( result.second != std::nullopt ) {
2684
0
            if ( options.jsonDumpFP != std::nullopt ) {
2685
0
                nlohmann::json j;
2686
0
                j["operation"] = op.ToJSON();
2687
0
                j["result"] = util::ToJSON(*result.second);
2688
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2689
0
            }
2690
0
        }
2691
2692
239
        if ( options.debug == true ) {
2693
0
            printf("Module %s result:\n\n%s\n\n",
2694
0
                    result.first->name.c_str(),
2695
0
                    result.second == std::nullopt ?
2696
0
                        "(empty)" :
2697
0
                        util::ToString(*result.second).c_str());
2698
0
        }
2699
2700
239
        if ( options.disableTests == false ) {
2701
239
            tests::test(op, result.second);
2702
239
        }
2703
2704
239
        postprocess(module, op, result);
2705
239
    }
2706
2707
238
    if ( options.noCompare == false ) {
2708
67
        compare(operations, results, data, size);
2709
67
    }
2710
238
}
2711
2712
/* Explicit template instantiation */
2713
template class ExecutorBase<component::Digest, operation::Digest>;
2714
template class ExecutorBase<component::MAC, operation::HMAC>;
2715
template class ExecutorBase<component::MAC, operation::UMAC>;
2716
template class ExecutorBase<component::MAC, operation::CMAC>;
2717
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2718
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2719
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2720
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2721
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2722
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2723
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2724
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2725
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2726
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2727
template class ExecutorBase<component::Key, operation::KDF_X963>;
2728
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2729
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2730
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2731
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2732
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2733
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2734
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2735
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2736
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2737
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2738
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2739
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2740
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2741
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2742
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2743
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2744
template class ExecutorBase<bool, operation::DSA_Verify>;
2745
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2746
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2747
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2748
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2749
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2750
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2751
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2752
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2753
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2754
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2755
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2756
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2757
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2758
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2759
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2760
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2761
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2762
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2763
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2764
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2765
template class ExecutorBase<bool, operation::BLS_Verify>;
2766
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2767
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2768
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2769
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2770
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2771
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2772
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2773
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2774
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2775
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2776
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2777
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2778
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2779
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2780
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2781
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2782
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2783
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2784
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2785
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2786
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2787
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2788
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2789
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2790
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2791
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2792
template class ExecutorBase<Buffer, operation::Misc>;
2793
template class ExecutorBase<bool, operation::SR25519_Verify>;
2794
2795
} /* namespace cryptofuzz */