Coverage Report

Created: 2022-08-24 06:26

/src/cryptofuzz-sp-math/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
            name(name),
18
            ID(fuzzing::datasource::ID( ("Cryptofuzz/Module/" + name).c_str()))
19
4
        { }
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
0
        virtual std::optional<component::MAC> OpUMAC(operation::UMAC& op) {
32
0
            (void)op;
33
0
            return std::nullopt;
34
0
        }
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
0
        virtual std::optional<component::Key> OpKDF_SCRYPT(operation::KDF_SCRYPT& op) {
44
0
            (void)op;
45
0
            return std::nullopt;
46
0
        }
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
0
        virtual std::optional<component::Key> OpKDF_TLS1_PRF(operation::KDF_TLS1_PRF& op) {
52
0
            (void)op;
53
0
            return std::nullopt;
54
0
        }
55
0
        virtual std::optional<component::Key> OpKDF_PBKDF(operation::KDF_PBKDF& op) {
56
0
            (void)op;
57
0
            return std::nullopt;
58
0
        }
59
0
        virtual std::optional<component::Key> OpKDF_PBKDF1(operation::KDF_PBKDF1& op) {
60
0
            (void)op;
61
0
            return std::nullopt;
62
0
        }
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
0
        virtual std::optional<component::Key> OpKDF_ARGON2(operation::KDF_ARGON2& op) {
68
0
            (void)op;
69
0
            return std::nullopt;
70
0
        }
71
0
        virtual std::optional<component::Key> OpKDF_SSH(operation::KDF_SSH& op) {
72
0
            (void)op;
73
0
            return std::nullopt;
74
0
        }
75
0
        virtual std::optional<component::Key> OpKDF_X963(operation::KDF_X963& op) {
76
0
            (void)op;
77
0
            return std::nullopt;
78
0
        }
79
0
        virtual std::optional<component::Key> OpKDF_BCRYPT(operation::KDF_BCRYPT& op) {
80
0
            (void)op;
81
0
            return std::nullopt;
82
0
        }
83
0
        virtual std::optional<component::Key> OpKDF_SP_800_108(operation::KDF_SP_800_108& op) {
84
0
            (void)op;
85
0
            return std::nullopt;
86
0
        }
87
0
        virtual std::optional<component::MAC> OpCMAC(operation::CMAC& op) {
88
0
            (void)op;
89
0
            return std::nullopt;
90
0
        }
91
0
        virtual std::optional<component::ECC_PublicKey> OpECC_PrivateToPublic(operation::ECC_PrivateToPublic& op) {
92
0
            (void)op;
93
0
            return std::nullopt;
94
0
        }
95
0
        virtual std::optional<bool> OpECC_ValidatePubkey(operation::ECC_ValidatePubkey& op) {
96
0
            (void)op;
97
0
            return std::nullopt;
98
0
        }
99
0
        virtual std::optional<component::ECC_KeyPair> OpECC_GenerateKeyPair(operation::ECC_GenerateKeyPair& op) {
100
0
            (void)op;
101
0
            return std::nullopt;
102
0
        }
103
0
        virtual std::optional<component::ECDSA_Signature> OpECDSA_Sign(operation::ECDSA_Sign& op) {
104
0
            (void)op;
105
0
            return std::nullopt;
106
0
        }
107
0
        virtual std::optional<component::ECGDSA_Signature> OpECGDSA_Sign(operation::ECGDSA_Sign& op) {
108
0
            (void)op;
109
0
            return std::nullopt;
110
0
        }
111
0
        virtual std::optional<component::ECRDSA_Signature> OpECRDSA_Sign(operation::ECRDSA_Sign& op) {
112
0
            (void)op;
113
0
            return std::nullopt;
114
0
        }
115
0
        virtual std::optional<component::Schnorr_Signature> OpSchnorr_Sign(operation::Schnorr_Sign& op) {
116
0
            (void)op;
117
0
            return std::nullopt;
118
0
        }
119
0
        virtual std::optional<bool> OpECDSA_Verify(operation::ECDSA_Verify& op) {
120
0
            (void)op;
121
0
            return std::nullopt;
122
0
        }
123
0
        virtual std::optional<bool> OpECGDSA_Verify(operation::ECGDSA_Verify& op) {
124
0
            (void)op;
125
0
            return std::nullopt;
126
0
        }
127
0
        virtual std::optional<bool> OpECRDSA_Verify(operation::ECRDSA_Verify& op) {
128
0
            (void)op;
129
0
            return std::nullopt;
130
0
        }
131
0
        virtual std::optional<bool> OpSchnorr_Verify(operation::Schnorr_Verify& op) {
132
0
            (void)op;
133
0
            return std::nullopt;
134
0
        }
135
0
        virtual std::optional<component::ECC_PublicKey> OpECDSA_Recover(operation::ECDSA_Recover& op) {
136
0
            (void)op;
137
0
            return std::nullopt;
138
0
        }
139
103
        virtual std::optional<component::Secret> OpECDH_Derive(operation::ECDH_Derive& op) {
140
103
            (void)op;
141
103
            return std::nullopt;
142
103
        }
143
182
        virtual std::optional<component::Ciphertext> OpECIES_Encrypt(operation::ECIES_Encrypt& op) {
144
182
            (void)op;
145
182
            return std::nullopt;
146
182
        }
147
132
        virtual std::optional<component::Cleartext> OpECIES_Decrypt(operation::ECIES_Decrypt& op) {
148
132
            (void)op;
149
132
            return std::nullopt;
150
132
        }
151
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Add(operation::ECC_Point_Add& op) {
152
0
            (void)op;
153
0
            return std::nullopt;
154
0
        }
155
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Mul(operation::ECC_Point_Mul& op) {
156
0
            (void)op;
157
0
            return std::nullopt;
158
0
        }
159
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Neg(operation::ECC_Point_Neg& op) {
160
0
            (void)op;
161
0
            return std::nullopt;
162
0
        }
163
0
        virtual std::optional<component::ECC_Point> OpECC_Point_Dbl(operation::ECC_Point_Dbl& op) {
164
0
            (void)op;
165
0
            return std::nullopt;
166
0
        }
167
661
        virtual std::optional<component::DH_KeyPair> OpDH_GenerateKeyPair(operation::DH_GenerateKeyPair& op) {
168
661
            (void)op;
169
661
            return std::nullopt;
170
661
        }
171
0
        virtual std::optional<component::Bignum> OpDH_Derive(operation::DH_Derive& op) {
172
0
            (void)op;
173
0
            return std::nullopt;
174
0
        }
175
0
        virtual std::optional<component::Bignum> OpBignumCalc(operation::BignumCalc& op) {
176
0
            (void)op;
177
0
            return std::nullopt;
178
0
        }
179
0
        virtual std::optional<component::Fp2> OpBignumCalc_Fp2(operation::BignumCalc_Fp2& op) {
180
0
            (void)op;
181
0
            return std::nullopt;
182
0
        }
183
0
        virtual std::optional<component::Fp12> OpBignumCalc_Fp12(operation::BignumCalc_Fp12& op) {
184
0
            (void)op;
185
0
            return std::nullopt;
186
0
        }
187
0
        virtual bool SupportsModularBignumCalc(void) const {
188
0
            return false;
189
0
        }
190
0
        virtual std::optional<component::BLS_PublicKey> OpBLS_PrivateToPublic(operation::BLS_PrivateToPublic& op) {
191
0
            (void)op;
192
0
            return std::nullopt;
193
0
        }
194
0
        virtual std::optional<component::G2> OpBLS_PrivateToPublic_G2(operation::BLS_PrivateToPublic_G2& op) {
195
0
            (void)op;
196
0
            return std::nullopt;
197
0
        }
198
0
        virtual std::optional<component::BLS_Signature> OpBLS_Sign(operation::BLS_Sign& op) {
199
0
            (void)op;
200
0
            return std::nullopt;
201
0
        }
202
0
        virtual std::optional<bool> OpBLS_Verify(operation::BLS_Verify& op) {
203
0
            (void)op;
204
0
            return std::nullopt;
205
0
        }
206
0
        virtual std::optional<component::BLS_BatchSignature> OpBLS_BatchSign(operation::BLS_BatchSign& op) {
207
0
            (void)op;
208
0
            return std::nullopt;
209
0
        }
210
0
        virtual std::optional<bool> OpBLS_BatchVerify(operation::BLS_BatchVerify& op) {
211
0
            (void)op;
212
0
            return std::nullopt;
213
0
        }
214
0
        virtual std::optional<component::G1> OpBLS_Aggregate_G1(operation::BLS_Aggregate_G1& op) {
215
0
            (void)op;
216
0
            return std::nullopt;
217
0
        }
218
0
        virtual std::optional<component::G2> OpBLS_Aggregate_G2(operation::BLS_Aggregate_G2& op) {
219
0
            (void)op;
220
0
            return std::nullopt;
221
0
        }
222
0
        virtual std::optional<component::Fp12> OpBLS_Pairing(operation::BLS_Pairing& op) {
223
0
            (void)op;
224
0
            return std::nullopt;
225
0
        }
226
0
        virtual std::optional<component::Fp12> OpBLS_MillerLoop(operation::BLS_MillerLoop& op) {
227
0
            (void)op;
228
0
            return std::nullopt;
229
0
        }
230
0
        virtual std::optional<component::Fp12> OpBLS_FinalExp(operation::BLS_FinalExp& op) {
231
0
            (void)op;
232
0
            return std::nullopt;
233
0
        }
234
0
        virtual std::optional<component::G1> OpBLS_HashToG1(operation::BLS_HashToG1& op) {
235
0
            (void)op;
236
0
            return std::nullopt;
237
0
        }
238
0
        virtual std::optional<component::G2> OpBLS_HashToG2(operation::BLS_HashToG2& op) {
239
0
            (void)op;
240
0
            return std::nullopt;
241
0
        }
242
0
        virtual std::optional<component::G1> OpBLS_MapToG1(operation::BLS_MapToG1& op) {
243
0
            (void)op;
244
0
            return std::nullopt;
245
0
        }
246
0
        virtual std::optional<component::G2> OpBLS_MapToG2(operation::BLS_MapToG2& op) {
247
0
            (void)op;
248
0
            return std::nullopt;
249
0
        }
250
0
        virtual std::optional<bool> OpBLS_IsG1OnCurve(operation::BLS_IsG1OnCurve& op) {
251
0
            (void)op;
252
0
            return std::nullopt;
253
0
        }
254
0
        virtual std::optional<bool> OpBLS_IsG2OnCurve(operation::BLS_IsG2OnCurve& op) {
255
0
            (void)op;
256
0
            return std::nullopt;
257
0
        }
258
0
        virtual std::optional<component::BLS_KeyPair> OpBLS_GenerateKeyPair(operation::BLS_GenerateKeyPair& op) {
259
0
            (void)op;
260
0
            return std::nullopt;
261
0
        }
262
0
        virtual std::optional<component::G1> OpBLS_Decompress_G1(operation::BLS_Decompress_G1& op) {
263
0
            (void)op;
264
0
            return std::nullopt;
265
0
        }
266
0
        virtual std::optional<component::Bignum> OpBLS_Compress_G1(operation::BLS_Compress_G1& op) {
267
0
            (void)op;
268
0
            return std::nullopt;
269
0
        }
270
0
        virtual std::optional<component::G2> OpBLS_Decompress_G2(operation::BLS_Decompress_G2& op) {
271
0
            (void)op;
272
0
            return std::nullopt;
273
0
        }
274
0
        virtual std::optional<component::G1> OpBLS_Compress_G2(operation::BLS_Compress_G2& op) {
275
0
            (void)op;
276
0
            return std::nullopt;
277
0
        }
278
0
        virtual std::optional<component::G1> OpBLS_G1_Add(operation::BLS_G1_Add& op) {
279
0
            (void)op;
280
0
            return std::nullopt;
281
0
        }
282
0
        virtual std::optional<component::G1> OpBLS_G1_Mul(operation::BLS_G1_Mul& op) {
283
0
            (void)op;
284
0
            return std::nullopt;
285
0
        }
286
0
        virtual std::optional<bool> OpBLS_G1_IsEq(operation::BLS_G1_IsEq& op) {
287
0
            (void)op;
288
0
            return std::nullopt;
289
0
        }
290
0
        virtual std::optional<component::G1> OpBLS_G1_Neg(operation::BLS_G1_Neg& op) {
291
0
            (void)op;
292
0
            return std::nullopt;
293
0
        }
294
0
        virtual std::optional<component::G2> OpBLS_G2_Add(operation::BLS_G2_Add& op) {
295
0
            (void)op;
296
0
            return std::nullopt;
297
0
        }
298
0
        virtual std::optional<component::G2> OpBLS_G2_Mul(operation::BLS_G2_Mul& op) {
299
0
            (void)op;
300
0
            return std::nullopt;
301
0
        }
302
0
        virtual std::optional<bool> OpBLS_G2_IsEq(operation::BLS_G2_IsEq& op) {
303
0
            (void)op;
304
0
            return std::nullopt;
305
0
        }
306
0
        virtual std::optional<component::G2> OpBLS_G2_Neg(operation::BLS_G2_Neg& op) {
307
0
            (void)op;
308
0
            return std::nullopt;
309
0
        }
310
0
        virtual std::optional<Buffer> OpMisc(operation::Misc& op) {
311
0
            (void)op;
312
0
            return std::nullopt;
313
0
        }
314
0
        virtual std::optional<bool> OpSR25519_Verify(operation::SR25519_Verify& op) {
315
0
            (void)op;
316
0
            return std::nullopt;
317
0
        }
318
};
319
320
} /* namespace cryptofuzz */