Coverage Report

Created: 2026-07-22 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-sp-math-all-8bit/include/cryptofuzz/module.h
Line
Count
Source
1
#pragma once
2
3
#include <string>
4
#include <cryptofuzz/components.h>
5
#include <cryptofuzz/operations.h>
6
#include <fuzzing/datasource/id.hpp>
7
#include <optional>
8
9
namespace cryptofuzz {
10
11
class Module {
12
    public:
13
        const std::string name;
14
        const uint64_t ID;
15
16
        Module(const std::string name) :
17
10
            name(name),
18
10
            ID(fuzzing::datasource::ID( ("Cryptofuzz/Module/" + name).c_str()))
19
10
        { }
20
21
0
        virtual ~Module() { }
22
23
0
        virtual std::optional<component::Digest> OpDigest(operation::Digest& op) {
24
0
            (void)op;
25
0
            return std::nullopt;
26
0
        }
27
0
        virtual std::optional<component::MAC> OpHMAC(operation::HMAC& op) {
28
0
            (void)op;
29
0
            return std::nullopt;
30
0
        }
31
43
        virtual std::optional<component::MAC> OpUMAC(operation::UMAC& op) {
32
43
            (void)op;
33
43
            return std::nullopt;
34
43
        }
35
0
        virtual std::optional<component::Ciphertext> OpSymmetricEncrypt(operation::SymmetricEncrypt& op) {
36
0
            (void)op;
37
0
            return std::nullopt;
38
0
        }
39
0
        virtual std::optional<component::Cleartext> OpSymmetricDecrypt(operation::SymmetricDecrypt& op) {
40
0
            (void)op;
41
0
            return std::nullopt;
42
0
        }
43
91
        virtual std::optional<component::Key> OpKDF_SCRYPT(operation::KDF_SCRYPT& op) {
44
91
            (void)op;
45
91
            return std::nullopt;
46
91
        }
47
0
        virtual std::optional<component::Key> OpKDF_HKDF(operation::KDF_HKDF& op) {
48
0
            (void)op;
49
0
            return std::nullopt;
50
0
        }
51
38
        virtual std::optional<component::Key> OpKDF_TLS1_PRF(operation::KDF_TLS1_PRF& op) {
52
38
            (void)op;
53
38
            return std::nullopt;
54
38
        }
55
73
        virtual std::optional<component::Key> OpKDF_PBKDF(operation::KDF_PBKDF& op) {
56
73
            (void)op;
57
73
            return std::nullopt;
58
73
        }
59
100
        virtual std::optional<component::Key> OpKDF_PBKDF1(operation::KDF_PBKDF1& op) {
60
100
            (void)op;
61
100
            return std::nullopt;
62
100
        }
63
0
        virtual std::optional<component::Key> OpKDF_PBKDF2(operation::KDF_PBKDF2& op) {
64
0
            (void)op;
65
0
            return std::nullopt;
66
0
        }
67
2
        virtual std::optional<component::Key> OpKDF_ARGON2(operation::KDF_ARGON2& op) {
68
2
            (void)op;
69
2
            return std::nullopt;
70
2
        }
71
71
        virtual std::optional<component::Key> OpKDF_SSH(operation::KDF_SSH& op) {
72
71
            (void)op;
73
71
            return std::nullopt;
74
71
        }
75
75
        virtual std::optional<component::Key> OpKDF_X963(operation::KDF_X963& op) {
76
75
            (void)op;
77
75
            return std::nullopt;
78
75
        }
79
12
        virtual std::optional<component::Key> OpKDF_BCRYPT(operation::KDF_BCRYPT& op) {
80
12
            (void)op;
81
12
            return std::nullopt;
82
12
        }
83
109
        virtual std::optional<component::Key> OpKDF_SP_800_108(operation::KDF_SP_800_108& op) {
84
109
            (void)op;
85
109
            return std::nullopt;
86
109
        }
87
73
        virtual std::optional<component::Key3> OpKDF_SRTP(operation::KDF_SRTP& op) {
88
73
            (void)op;
89
73
            return std::nullopt;
90
73
        }
91
89
        virtual std::optional<component::Key3> OpKDF_SRTCP(operation::KDF_SRTCP& op) {
92
89
            (void)op;
93
89
            return std::nullopt;
94
89
        }
95
0
        virtual std::optional<component::MAC> OpCMAC(operation::CMAC& op) {
96
0
            (void)op;
97
0
            return std::nullopt;
98
0
        }
99
0
        virtual std::optional<component::ECC_PublicKey> OpECC_PrivateToPublic(operation::ECC_PrivateToPublic& op) {
100
0
            (void)op;
101
0
            return std::nullopt;
102
0
        }
103
0
        virtual std::optional<bool> OpECC_ValidatePubkey(operation::ECC_ValidatePubkey& op) {
104
0
            (void)op;
105
0
            return std::nullopt;
106
0
        }
107
1
        virtual std::optional<component::ECC_KeyPair> OpECC_GenerateKeyPair(operation::ECC_GenerateKeyPair& op) {
108
1
            (void)op;
109
1
            return std::nullopt;
110
1
        }
111
2
        virtual std::optional<component::ECCSI_Signature> OpECCSI_Sign(operation::ECCSI_Sign& op) {
112
2
            (void)op;
113
2
            return std::nullopt;
114
2
        }
115
0
        virtual std::optional<component::ECDSA_Signature> OpECDSA_Sign(operation::ECDSA_Sign& op) {
116
0
            (void)op;
117
0
            return std::nullopt;
118
0
        }
119
2
        virtual std::optional<component::ECGDSA_Signature> OpECGDSA_Sign(operation::ECGDSA_Sign& op) {
120
2
            (void)op;
121
2
            return std::nullopt;
122
2
        }
123
0
        virtual std::optional<component::ECRDSA_Signature> OpECRDSA_Sign(operation::ECRDSA_Sign& op) {
124
0
            (void)op;
125
0
            return std::nullopt;
126
0
        }
127
11
        virtual std::optional<component::Schnorr_Signature> OpSchnorr_Sign(operation::Schnorr_Sign& op) {
128
11
            (void)op;
129
11
            return std::nullopt;
130
11
        }
131
12
        virtual std::optional<bool> OpECCSI_Verify(operation::ECCSI_Verify& op) {
132
12
            (void)op;
133
12
            return std::nullopt;
134
12
        }
135
0
        virtual std::optional<bool> OpECDSA_Verify(operation::ECDSA_Verify& op) {
136
0
            (void)op;
137
0
            return std::nullopt;
138
0
        }
139
2
        virtual std::optional<bool> OpECGDSA_Verify(operation::ECGDSA_Verify& op) {
140
2
            (void)op;
141
2
            return std::nullopt;
142
2
        }
143
2
        virtual std::optional<bool> OpECRDSA_Verify(operation::ECRDSA_Verify& op) {
144
2
            (void)op;
145
2
            return std::nullopt;
146
2
        }
147
10
        virtual std::optional<bool> OpSchnorr_Verify(operation::Schnorr_Verify& op) {
148
10
            (void)op;
149
10
            return std::nullopt;
150
10
        }
151
7
        virtual std::optional<component::ECC_PublicKey> OpECDSA_Recover(operation::ECDSA_Recover& op) {
152
7
            (void)op;
153
7
            return std::nullopt;
154
7
        }
155
27
        virtual std::optional<bool> OpDSA_Verify(operation::DSA_Verify& op) {
156
27
            (void)op;
157
27
            return std::nullopt;
158
27
        }
159
2
        virtual std::optional<component::DSA_Signature> OpDSA_Sign(operation::DSA_Sign& op) {
160
2
            (void)op;
161
2
            return std::nullopt;
162
2
        }
163
0
        virtual std::optional<component::DSA_Parameters> OpDSA_GenerateParameters(operation::DSA_GenerateParameters& op) {
164
0
            (void)op;
165
0
            return std::nullopt;
166
0
        }
167
10
        virtual std::optional<component::Bignum> OpDSA_PrivateToPublic(operation::DSA_PrivateToPublic& op) {
168
10
            (void)op;
169
10
            return std::nullopt;
170
10
        }
171
11
        virtual std::optional<component::DSA_KeyPair> OpDSA_GenerateKeyPair(operation::DSA_GenerateKeyPair& op) {
172
11
            (void)op;
173
11
            return std::nullopt;
174
11
        }
175
6
        virtual std::optional<component::Secret> OpECDH_Derive(operation::ECDH_Derive& op) {
176
6
            (void)op;
177
6
            return std::nullopt;
178
6
        }
179
2
        virtual std::optional<component::Ciphertext> OpECIES_Encrypt(operation::ECIES_Encrypt& op) {
180
2
            (void)op;
181
2
            return std::nullopt;
182
2
        }
183
2
        virtual std::optional<component::Cleartext> OpECIES_Decrypt(operation::ECIES_Decrypt& op) {
184
2
            (void)op;
185
2
            return std::nullopt;
186
2
        }
187
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Add(operation::ECC_Point_Add& op) {
188
0
            (void)op;
189
0
            return std::nullopt;
190
0
        }
191
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Sub(operation::ECC_Point_Sub& op) {
192
0
            (void)op;
193
0
            return std::nullopt;
194
0
        }
195
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Mul(operation::ECC_Point_Mul& op) {
196
0
            (void)op;
197
0
            return std::nullopt;
198
0
        }
199
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Neg(operation::ECC_Point_Neg& op) {
200
0
            (void)op;
201
0
            return std::nullopt;
202
0
        }
203
2
        virtual std::optional<component::ECC_Point> OpECC_Point_Dbl(operation::ECC_Point_Dbl& op) {
204
2
            (void)op;
205
2
            return std::nullopt;
206
2
        }
207
0
        virtual std::optional<bool> OpECC_Point_Cmp(operation::ECC_Point_Cmp& op) {
208
0
            (void)op;
209
0
            return std::nullopt;
210
0
        }
211
6
        virtual std::optional<component::DH_KeyPair> OpDH_GenerateKeyPair(operation::DH_GenerateKeyPair& op) {
212
6
            (void)op;
213
6
            return std::nullopt;
214
6
        }
215
20
        virtual std::optional<component::Bignum> OpDH_Derive(operation::DH_Derive& op) {
216
20
            (void)op;
217
20
            return std::nullopt;
218
20
        }
219
0
        virtual std::optional<component::Bignum> OpBignumCalc(operation::BignumCalc& op) {
220
0
            (void)op;
221
0
            return std::nullopt;
222
0
        }
223
26
        virtual std::optional<component::Fp2> OpBignumCalc_Fp2(operation::BignumCalc_Fp2& op) {
224
26
            (void)op;
225
26
            return std::nullopt;
226
26
        }
227
181
        virtual std::optional<component::Fp12> OpBignumCalc_Fp12(operation::BignumCalc_Fp12& op) {
228
181
            (void)op;
229
181
            return std::nullopt;
230
181
        }
231
35
        virtual bool SupportsModularBignumCalc(void) const {
232
35
            return false;
233
35
        }
234
0
        virtual std::optional<component::BLS_PublicKey> OpBLS_PrivateToPublic(operation::BLS_PrivateToPublic& op) {
235
0
            (void)op;
236
0
            return std::nullopt;
237
0
        }
238
17
        virtual std::optional<component::G2> OpBLS_PrivateToPublic_G2(operation::BLS_PrivateToPublic_G2& op) {
239
17
            (void)op;
240
17
            return std::nullopt;
241
17
        }
242
7
        virtual std::optional<component::BLS_Signature> OpBLS_Sign(operation::BLS_Sign& op) {
243
7
            (void)op;
244
7
            return std::nullopt;
245
7
        }
246
18
        virtual std::optional<bool> OpBLS_Verify(operation::BLS_Verify& op) {
247
18
            (void)op;
248
18
            return std::nullopt;
249
18
        }
250
8
        virtual std::optional<component::BLS_BatchSignature> OpBLS_BatchSign(operation::BLS_BatchSign& op) {
251
8
            (void)op;
252
8
            return std::nullopt;
253
8
        }
254
12
        virtual std::optional<bool> OpBLS_BatchVerify(operation::BLS_BatchVerify& op) {
255
12
            (void)op;
256
12
            return std::nullopt;
257
12
        }
258
8
        virtual std::optional<component::G1> OpBLS_Aggregate_G1(operation::BLS_Aggregate_G1& op) {
259
8
            (void)op;
260
8
            return std::nullopt;
261
8
        }
262
7
        virtual std::optional<component::G2> OpBLS_Aggregate_G2(operation::BLS_Aggregate_G2& op) {
263
7
            (void)op;
264
7
            return std::nullopt;
265
7
        }
266
4
        virtual std::optional<component::Fp12> OpBLS_Pairing(operation::BLS_Pairing& op) {
267
4
            (void)op;
268
4
            return std::nullopt;
269
4
        }
270
4
        virtual std::optional<component::Fp12> OpBLS_MillerLoop(operation::BLS_MillerLoop& op) {
271
4
            (void)op;
272
4
            return std::nullopt;
273
4
        }
274
16
        virtual std::optional<component::Fp12> OpBLS_FinalExp(operation::BLS_FinalExp& op) {
275
16
            (void)op;
276
16
            return std::nullopt;
277
16
        }
278
2
        virtual std::optional<component::G1> OpBLS_HashToG1(operation::BLS_HashToG1& op) {
279
2
            (void)op;
280
2
            return std::nullopt;
281
2
        }
282
7
        virtual std::optional<component::G2> OpBLS_HashToG2(operation::BLS_HashToG2& op) {
283
7
            (void)op;
284
7
            return std::nullopt;
285
7
        }
286
7
        virtual std::optional<component::G1> OpBLS_MapToG1(operation::BLS_MapToG1& op) {
287
7
            (void)op;
288
7
            return std::nullopt;
289
7
        }
290
3
        virtual std::optional<component::G2> OpBLS_MapToG2(operation::BLS_MapToG2& op) {
291
3
            (void)op;
292
3
            return std::nullopt;
293
3
        }
294
14
        virtual std::optional<bool> OpBLS_IsG1OnCurve(operation::BLS_IsG1OnCurve& op) {
295
14
            (void)op;
296
14
            return std::nullopt;
297
14
        }
298
12
        virtual std::optional<bool> OpBLS_IsG2OnCurve(operation::BLS_IsG2OnCurve& op) {
299
12
            (void)op;
300
12
            return std::nullopt;
301
12
        }
302
2
        virtual std::optional<component::BLS_KeyPair> OpBLS_GenerateKeyPair(operation::BLS_GenerateKeyPair& op) {
303
2
            (void)op;
304
2
            return std::nullopt;
305
2
        }
306
0
        virtual std::optional<component::G1> OpBLS_Decompress_G1(operation::BLS_Decompress_G1& op) {
307
0
            (void)op;
308
0
            return std::nullopt;
309
0
        }
310
0
        virtual std::optional<component::Bignum> OpBLS_Compress_G1(operation::BLS_Compress_G1& op) {
311
0
            (void)op;
312
0
            return std::nullopt;
313
0
        }
314
6
        virtual std::optional<component::G2> OpBLS_Decompress_G2(operation::BLS_Decompress_G2& op) {
315
6
            (void)op;
316
6
            return std::nullopt;
317
6
        }
318
3
        virtual std::optional<component::G1> OpBLS_Compress_G2(operation::BLS_Compress_G2& op) {
319
3
            (void)op;
320
3
            return std::nullopt;
321
3
        }
322
39
        virtual std::optional<component::G1> OpBLS_G1_Add(operation::BLS_G1_Add& op) {
323
39
            (void)op;
324
39
            return std::nullopt;
325
39
        }
326
14
        virtual std::optional<component::G1> OpBLS_G1_Mul(operation::BLS_G1_Mul& op) {
327
14
            (void)op;
328
14
            return std::nullopt;
329
14
        }
330
29
        virtual std::optional<bool> OpBLS_G1_IsEq(operation::BLS_G1_IsEq& op) {
331
29
            (void)op;
332
29
            return std::nullopt;
333
29
        }
334
18
        virtual std::optional<component::G1> OpBLS_G1_Neg(operation::BLS_G1_Neg& op) {
335
18
            (void)op;
336
18
            return std::nullopt;
337
18
        }
338
75
        virtual std::optional<component::G2> OpBLS_G2_Add(operation::BLS_G2_Add& op) {
339
75
            (void)op;
340
75
            return std::nullopt;
341
75
        }
342
43
        virtual std::optional<component::G2> OpBLS_G2_Mul(operation::BLS_G2_Mul& op) {
343
43
            (void)op;
344
43
            return std::nullopt;
345
43
        }
346
47
        virtual std::optional<bool> OpBLS_G2_IsEq(operation::BLS_G2_IsEq& op) {
347
47
            (void)op;
348
47
            return std::nullopt;
349
47
        }
350
50
        virtual std::optional<component::G2> OpBLS_G2_Neg(operation::BLS_G2_Neg& op) {
351
50
            (void)op;
352
50
            return std::nullopt;
353
50
        }
354
52
        virtual std::optional<component::G1> OpBLS_G1_MultiExp(operation::BLS_G1_MultiExp& op) {
355
52
            (void)op;
356
52
            return std::nullopt;
357
52
        }
358
6
        virtual std::optional<Buffer> OpMisc(operation::Misc& op) {
359
6
            (void)op;
360
6
            return std::nullopt;
361
6
        }
362
9
        virtual std::optional<bool> OpSR25519_Verify(operation::SR25519_Verify& op) {
363
9
            (void)op;
364
9
            return std::nullopt;
365
9
        }
366
};
367
368
} /* namespace cryptofuzz */