Coverage Report

Created: 2025-07-23 06:59

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