forked from malekremy/cryptofuzz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
driver.cpp
474 lines (461 loc) · 28.4 KB
/
driver.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
#include "driver.h"
#include <fuzzing/datasource/id.hpp>
#include "tests.h"
#include "executor.h"
#include <cryptofuzz/util.h>
#include <set>
#include <algorithm>
#include <unistd.h>
namespace cryptofuzz {
void Driver::LoadModule(std::shared_ptr<Module> module) {
modules[module->ID] = module;
}
void Driver::Run(const uint8_t* data, const size_t size) const {
using fuzzing::datasource::ID;
static ExecutorDigest executorDigest(CF_OPERATION("Digest"), modules, options);
static ExecutorHMAC executorHMAC(CF_OPERATION("HMAC"), modules, options);
static ExecutorUMAC executorUMAC(CF_OPERATION("UMAC"), modules, options);
static ExecutorCMAC executorCMAC(CF_OPERATION("CMAC"), modules, options);
static ExecutorSymmetricEncrypt executorSymmetricEncrypt(CF_OPERATION("SymmetricEncrypt"), modules, options);
static ExecutorSymmetricDecrypt executorSymmetricDecrypt(CF_OPERATION("SymmetricDecrypt"), modules, options);
static ExecutorKDF_SCRYPT executorKDF_SCRYPT(CF_OPERATION("KDF_SCRYPT"), modules, options);
static ExecutorKDF_HKDF executorKDF_HKDF(CF_OPERATION("KDF_HKDF"), modules, options);
static ExecutorKDF_TLS1_PRF executorKDF_TLS1_PRF(CF_OPERATION("KDF_TLS1_PRF"), modules, options);
static ExecutorKDF_PBKDF executorKDF_PBKDF(CF_OPERATION("KDF_PBKDF"), modules, options);
static ExecutorKDF_PBKDF1 executorKDF_PBKDF1(CF_OPERATION("KDF_PBKDF1"), modules, options);
static ExecutorKDF_PBKDF2 executorKDF_PBKDF2(CF_OPERATION("KDF_PBKDF2"), modules, options);
static ExecutorKDF_ARGON2 executorKDF_ARGON2(CF_OPERATION("KDF_ARGON2"), modules, options);
static ExecutorKDF_SSH executorKDF_SSH(ID("Cryptofuzz/Operation/KDF_SSH"), modules, options);
static ExecutorKDF_X963 executorKDF_X963(CF_OPERATION("KDF_X963"), modules, options);
static ExecutorKDF_BCRYPT executorKDF_BCRYPT(CF_OPERATION("KDF_BCRYPT"), modules, options);
static ExecutorKDF_SP_800_108 executorKDF_SP_800_108(CF_OPERATION("KDF_SP_800_108"), modules, options);
static ExecutorKDF_SRTP executorKDF_SRTP(CF_OPERATION("KDF_SRTP"), modules, options);
static ExecutorKDF_SRTCP executorKDF_SRTCP(CF_OPERATION("KDF_SRTCP"), modules, options);
static ExecutorECC_PrivateToPublic executorECC_PrivateToPublic(CF_OPERATION("ECC_PrivateToPublic"), modules, options);
static ExecutorECC_ValidatePubkey executorECC_ValidatePubkey(CF_OPERATION("ECC_ValidatePubkey"), modules, options);
static ExecutorECC_GenerateKeyPair executorECC_GenerateKeyPair(CF_OPERATION("ECC_GenerateKeyPair"), modules, options);
static ExecutorECCSI_Sign executorECCSI_Sign(CF_OPERATION("ECCSI_Sign"), modules, options);
static ExecutorECDSA_Sign executorECDSA_Sign(CF_OPERATION("ECDSA_Sign"), modules, options);
static ExecutorECGDSA_Sign executorECGDSA_Sign(CF_OPERATION("ECGDSA_Sign"), modules, options);
static ExecutorECRDSA_Sign executorECRDSA_Sign(CF_OPERATION("ECRDSA_Sign"), modules, options);
static ExecutorSchnorr_Sign executorSchnorr_Sign(CF_OPERATION("Schnorr_Sign"), modules, options);
static ExecutorECCSI_Verify executorECCSI_Verify(CF_OPERATION("ECCSI_Verify"), modules, options);
static ExecutorECDSA_Verify executorECDSA_Verify(CF_OPERATION("ECDSA_Verify"), modules, options);
static ExecutorECGDSA_Verify executorECGDSA_Verify(CF_OPERATION("ECGDSA_Verify"), modules, options);
static ExecutorECRDSA_Verify executorECRDSA_Verify(CF_OPERATION("ECRDSA_Verify"), modules, options);
static ExecutorSchnorr_Verify executorSchnorr_Verify(CF_OPERATION("Schnorr_Verify"), modules, options);
static ExecutorECDSA_Recover executorECDSA_Recover(CF_OPERATION("ECDSA_Recover"), modules, options);
static ExecutorDSA_Verify executorDSA_Verify(CF_OPERATION("DSA_Verify"), modules, options);
static ExecutorDSA_Sign executorDSA_Sign(CF_OPERATION("DSA_Sign"), modules, options);
static ExecutorDSA_GenerateParameters executorDSA_GenerateParameters(CF_OPERATION("DSA_GenerateParameters"), modules, options);
static ExecutorDSA_PrivateToPublic executorDSA_PrivateToPublic(CF_OPERATION("DSA_PrivateToPublic"), modules, options);
static ExecutorDSA_GenerateKeyPair executorDSA_GenerateKeyPair(CF_OPERATION("DSA_GenerateKeyPair"), modules, options);
static ExecutorECDH_Derive executorECDH_Derive(CF_OPERATION("ECDH_Derive"), modules, options);
static ExecutorECIES_Encrypt executorECIES_Encrypt(CF_OPERATION("ECIES_Encrypt"), modules, options);
static ExecutorECIES_Decrypt executorECIES_Decrypt(CF_OPERATION("ECIES_Decrypt"), modules, options);
static ExecutorECC_Point_Add executorECC_Point_Add(CF_OPERATION("ECC_Point_Add"), modules, options);
static ExecutorECC_Point_Sub executorECC_Point_Sub(CF_OPERATION("ECC_Point_Sub"), modules, options);
static ExecutorECC_Point_Mul executorECC_Point_Mul(CF_OPERATION("ECC_Point_Mul"), modules, options);
static ExecutorECC_Point_Neg executorECC_Point_Neg(CF_OPERATION("ECC_Point_Neg"), modules, options);
static ExecutorECC_Point_Dbl executorECC_Point_Dbl(CF_OPERATION("ECC_Point_Dbl"), modules, options);
static ExecutorECC_Point_Cmp executorECC_Point_Cmp(CF_OPERATION("ECC_Point_Cmp"), modules, options);
static ExecutorDH_GenerateKeyPair executorDH_GenerateKeyPair(CF_OPERATION("DH_GenerateKeyPair"), modules, options);
static ExecutorDH_Derive executorDH_Derive(CF_OPERATION("DH_Derive"), modules, options);
static ExecutorBignumCalc executorBignumCalc(CF_OPERATION("BignumCalc"), modules, options);
static ExecutorBignumCalc_Fp2 executorBignumCalc_Fp2(CF_OPERATION("BignumCalc_Fp2"), modules, options);
static ExecutorBignumCalc_Fp12 executorBignumCalc_Fp12(CF_OPERATION("BignumCalc_Fp12"), modules, options);
static ExecutorBignumCalc_Mod_BLS12_381_R executorBignumCalc_mod_bls12_381_r(CF_OPERATION("BignumCalc_Mod_BLS12_381_R"), modules, options);
static ExecutorBignumCalc_Mod_BLS12_381_P executorBignumCalc_mod_bls12_381_p(CF_OPERATION("BignumCalc_Mod_BLS12_381_P"), modules, options);
static ExecutorBignumCalc_Mod_BLS12_377_R executorBignumCalc_mod_bls12_377_r(CF_OPERATION("BignumCalc_Mod_BLS12_377_R"), modules, options);
static ExecutorBignumCalc_Mod_BLS12_377_P executorBignumCalc_mod_bls12_377_p(CF_OPERATION("BignumCalc_Mod_BLS12_377_P"), modules, options);
static ExecutorBignumCalc_Mod_BN128_R executorBignumCalc_mod_bn128_r(CF_OPERATION("BignumCalc_Mod_BN128_R"), modules, options);
static ExecutorBignumCalc_Mod_BN128_P executorBignumCalc_mod_bn128_p(CF_OPERATION("BignumCalc_Mod_BN128_P"), modules, options);
static ExecutorBignumCalc_Mod_Vesta_R executorBignumCalc_mod_vesta_r(CF_OPERATION("BignumCalc_Mod_Vesta_R"), modules, options);
static ExecutorBignumCalc_Mod_Vesta_P executorBignumCalc_mod_vesta_p(CF_OPERATION("BignumCalc_Mod_Vesta_P"), modules, options);
static ExecutorBignumCalc_Mod_ED25519 executorBignumCalc_mod_ed25519(CF_OPERATION("BignumCalc_Mod_ED25519"), modules, options);
static ExecutorBignumCalc_Mod_Edwards_R executorBignumCalc_mod_edwards_r(CF_OPERATION("BignumCalc_Mod_Edwards_R"), modules, options);
static ExecutorBignumCalc_Mod_Edwards_P executorBignumCalc_mod_edwards_p(CF_OPERATION("BignumCalc_Mod_Edwards_P"), modules, options);
static ExecutorBignumCalc_Mod_Goldilocks executorBignumCalc_mod_goldilocks(CF_OPERATION("BignumCalc_Mod_Goldilocks"), modules, options);
static ExecutorBignumCalc_Mod_MNT4_R executorBignumCalc_mod_mnt4_r(CF_OPERATION("BignumCalc_Mod_MNT4_R"), modules, options);
static ExecutorBignumCalc_Mod_MNT4_P executorBignumCalc_mod_mnt4_p(CF_OPERATION("BignumCalc_Mod_MNT4_P"), modules, options);
static ExecutorBignumCalc_Mod_MNT6_R executorBignumCalc_mod_mnt6_r(CF_OPERATION("BignumCalc_Mod_MNT6_R"), modules, options);
static ExecutorBignumCalc_Mod_MNT6_P executorBignumCalc_mod_mnt6_p(CF_OPERATION("BignumCalc_Mod_MNT6_P"), modules, options);
static ExecutorBignumCalc_Mod_2Exp64 executorBignumCalc_mod_2exp64(CF_OPERATION("BignumCalc_Mod_2Exp64"), modules, options);
static ExecutorBignumCalc_Mod_2Exp128 executorBignumCalc_mod_2exp128(CF_OPERATION("BignumCalc_Mod_2Exp128"), modules, options);
static ExecutorBignumCalc_Mod_2Exp256 executorBignumCalc_mod_2exp256(CF_OPERATION("BignumCalc_Mod_2Exp256"), modules, options);
static ExecutorBignumCalc_Mod_2Exp512 executorBignumCalc_mod_2exp512(CF_OPERATION("BignumCalc_Mod_2Exp512"), modules, options);
static ExecutorBignumCalc_Mod_SECP256K1 executorBignumCalc_mod_secp256k1(CF_OPERATION("BignumCalc_Mod_SECP256K1"), modules, options);
static ExecutorBignumCalc_Mod_SECP256K1_P executorBignumCalc_mod_secp256k1_p(CF_OPERATION("BignumCalc_Mod_SECP256K1_P"), modules, options);
static ExecutorBLS_PrivateToPublic executorBLS_PrivateToPublic(CF_OPERATION("BLS_PrivateToPublic"), modules, options);
static ExecutorBLS_PrivateToPublic_G2 executorBLS_PrivateToPublic_G2(CF_OPERATION("BLS_PrivateToPublic_G2"), modules, options);
static ExecutorBLS_Sign executorBLS_Sign(CF_OPERATION("BLS_Sign"), modules, options);
static ExecutorBLS_Verify executorBLS_Verify(CF_OPERATION("BLS_Verify"), modules, options);
static ExecutorBLS_BatchSign executorBLS_BatchSign(CF_OPERATION("BLS_BatchSign"), modules, options);
static ExecutorBLS_BatchVerify executorBLS_BatchVerify(CF_OPERATION("BLS_BatchVerify"), modules, options);
static ExecutorBLS_Aggregate_G1 executorBLS_Aggregate_G1(CF_OPERATION("BLS_Aggregate_G1"), modules, options);
static ExecutorBLS_Aggregate_G2 executorBLS_Aggregate_G2(CF_OPERATION("BLS_Aggregate_G2"), modules, options);
static ExecutorBLS_Pairing executorBLS_Pairing(CF_OPERATION("BLS_Pairing"), modules, options);
static ExecutorBLS_MillerLoop executorBLS_MillerLoop(CF_OPERATION("BLS_MillerLoop"), modules, options);
static ExecutorBLS_FinalExp executorBLS_FinalExp(CF_OPERATION("BLS_FinalExp"), modules, options);
static ExecutorBLS_HashToG1 executorBLS_HashToG1(CF_OPERATION("BLS_HashToG1"), modules, options);
static ExecutorBLS_HashToG2 executorBLS_HashToG2(CF_OPERATION("BLS_HashToG2"), modules, options);
static ExecutorBLS_MapToG1 executorBLS_MapToG1(CF_OPERATION("BLS_MapToG1"), modules, options);
static ExecutorBLS_MapToG2 executorBLS_MapToG2(CF_OPERATION("BLS_MapToG2"), modules, options);
static ExecutorBLS_IsG1OnCurve executorBLS_IsG1OnCurve(CF_OPERATION("BLS_IsG1OnCurve"), modules, options);
static ExecutorBLS_IsG2OnCurve executorBLS_IsG2OnCurve(CF_OPERATION("BLS_IsG2OnCurve"), modules, options);
static ExecutorBLS_GenerateKeyPair executorBLS_GenerateKeyPair(CF_OPERATION("BLS_GenerateKeyPair"), modules, options);
static ExecutorBLS_Decompress_G1 executorBLS_Decompress_G1(CF_OPERATION("BLS_Decompress_G1"), modules, options);
static ExecutorBLS_Compress_G1 executorBLS_Compress_G1(CF_OPERATION("BLS_Compress_G1"), modules, options);
static ExecutorBLS_Decompress_G2 executorBLS_Decompress_G2(CF_OPERATION("BLS_Decompress_G2"), modules, options);
static ExecutorBLS_Compress_G2 executorBLS_Compress_G2(CF_OPERATION("BLS_Compress_G2"), modules, options);
static ExecutorBLS_G1_Add executorBLS_G1_Add(CF_OPERATION("BLS_G1_Add"), modules, options);
static ExecutorBLS_G1_Mul executorBLS_G1_Mul(CF_OPERATION("BLS_G1_Mul"), modules, options);
static ExecutorBLS_G1_IsEq executorBLS_G1_IsEq(CF_OPERATION("BLS_G1_IsEq"), modules, options);
static ExecutorBLS_G1_Neg executorBLS_G1_Neg(CF_OPERATION("BLS_G1_Neg"), modules, options);
static ExecutorBLS_G2_Add executorBLS_G2_Add(CF_OPERATION("BLS_G2_Add"), modules, options);
static ExecutorBLS_G2_Mul executorBLS_G2_Mul(CF_OPERATION("BLS_G2_Mul"), modules, options);
static ExecutorBLS_G2_IsEq executorBLS_G2_IsEq(CF_OPERATION("BLS_G2_IsEq"), modules, options);
static ExecutorBLS_G2_Neg executorBLS_G2_Neg(CF_OPERATION("BLS_G2_Neg"), modules, options);
static ExecutorBLS_G1_MultiExp executorBLS_G1_MultiExp(CF_OPERATION("BLS_G1_MultiExp"), modules, options);
static ExecutorMisc executorMisc(CF_OPERATION("Misc"), modules, options);
static ExecutorSR25519_Verify executorSR25519_Verify(CF_OPERATION("SR25519_Verify"), modules, options);
try {
Datasource ds(data, size);
const auto operation = ds.Get<uint64_t>();
if ( !options.operations.Have(operation) ) {
return;
}
const auto payload = ds.GetData(0, 1);
switch ( operation ) {
case CF_OPERATION("Digest"):
executorDigest.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("HMAC"):
executorHMAC.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("UMAC"):
executorUMAC.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("CMAC"):
executorCMAC.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("SymmetricEncrypt"):
executorSymmetricEncrypt.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("SymmetricDecrypt"):
executorSymmetricDecrypt.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_SCRYPT"):
executorKDF_SCRYPT.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_HKDF"):
executorKDF_HKDF.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_TLS1_PRF"):
executorKDF_TLS1_PRF.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_PBKDF"):
executorKDF_PBKDF.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_PBKDF1"):
executorKDF_PBKDF1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_PBKDF2"):
executorKDF_PBKDF2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_ARGON2"):
executorKDF_ARGON2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_SSH"):
executorKDF_SSH.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_X963"):
executorKDF_X963.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_BCRYPT"):
executorKDF_BCRYPT.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_SP_800_108"):
executorKDF_SP_800_108.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_SRTP"):
executorKDF_SRTP.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("KDF_SRTCP"):
executorKDF_SRTCP.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_PrivateToPublic"):
executorECC_PrivateToPublic.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_ValidatePubkey"):
executorECC_ValidatePubkey.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_GenerateKeyPair"):
executorECC_GenerateKeyPair.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECCSI_Sign"):
executorECCSI_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECDSA_Sign"):
executorECDSA_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECGDSA_Sign"):
executorECGDSA_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECRDSA_Sign"):
executorECRDSA_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("Schnorr_Sign"):
executorSchnorr_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECCSI_Verify"):
executorECCSI_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECDSA_Verify"):
executorECDSA_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECGDSA_Verify"):
executorECGDSA_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECRDSA_Verify"):
executorECRDSA_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("Schnorr_Verify"):
executorSchnorr_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECDSA_Recover"):
executorECDSA_Recover.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DSA_Verify"):
executorDSA_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DSA_Sign"):
executorDSA_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DSA_GenerateParameters"):
executorDSA_GenerateParameters.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DSA_PrivateToPublic"):
executorDSA_PrivateToPublic.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DSA_GenerateKeyPair"):
executorDSA_GenerateKeyPair.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECDH_Derive"):
executorECDH_Derive.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECIES_Encrypt"):
executorECIES_Encrypt.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECIES_Decrypt"):
executorECIES_Decrypt.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Add"):
executorECC_Point_Add.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Sub"):
executorECC_Point_Sub.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Mul"):
executorECC_Point_Mul.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Neg"):
executorECC_Point_Neg.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Dbl"):
executorECC_Point_Dbl.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("ECC_Point_Cmp"):
executorECC_Point_Cmp.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DH_GenerateKeyPair"):
executorDH_GenerateKeyPair.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("DH_Derive"):
executorDH_Derive.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc"):
executorBignumCalc.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Fp2"):
executorBignumCalc_Fp2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Fp12"):
executorBignumCalc_Fp12.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BLS12_381_R"):
executorBignumCalc_mod_bls12_381_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BLS12_381_P"):
executorBignumCalc_mod_bls12_381_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BLS12_377_R"):
executorBignumCalc_mod_bls12_377_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BLS12_377_P"):
executorBignumCalc_mod_bls12_377_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BN128_R"):
executorBignumCalc_mod_bn128_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_BN128_P"):
executorBignumCalc_mod_bn128_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_Vesta_R"):
executorBignumCalc_mod_vesta_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_Vesta_P"):
executorBignumCalc_mod_vesta_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_ED25519"):
executorBignumCalc_mod_ed25519.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_Edwards_R"):
executorBignumCalc_mod_edwards_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_Edwards_P"):
executorBignumCalc_mod_edwards_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_Goldilocks"):
executorBignumCalc_mod_goldilocks.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_MNT4_R"):
executorBignumCalc_mod_mnt4_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_MNT4_P"):
executorBignumCalc_mod_mnt4_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_MNT6_R"):
executorBignumCalc_mod_mnt6_r.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_MNT6_P"):
executorBignumCalc_mod_mnt6_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_2Exp64"):
executorBignumCalc_mod_2exp64.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_2Exp128"):
executorBignumCalc_mod_2exp128.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_2Exp256"):
executorBignumCalc_mod_2exp256.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_2Exp512"):
executorBignumCalc_mod_2exp512.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_SECP256K1"):
executorBignumCalc_mod_secp256k1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BignumCalc_Mod_SECP256K1_P"):
executorBignumCalc_mod_secp256k1_p.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_PrivateToPublic"):
executorBLS_PrivateToPublic.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_PrivateToPublic_G2"):
executorBLS_PrivateToPublic_G2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Sign"):
executorBLS_Sign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Verify"):
executorBLS_Verify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_BatchSign"):
executorBLS_BatchSign.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_BatchVerify"):
executorBLS_BatchVerify.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Aggregate_G1"):
executorBLS_Aggregate_G1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Aggregate_G2"):
executorBLS_Aggregate_G2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Pairing"):
executorBLS_Pairing.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_MillerLoop"):
executorBLS_MillerLoop.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_FinalExp"):
executorBLS_FinalExp.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_HashToG1"):
executorBLS_HashToG1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_HashToG2"):
executorBLS_HashToG2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_MapToG1"):
executorBLS_MapToG1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_MapToG2"):
executorBLS_MapToG2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_IsG1OnCurve"):
executorBLS_IsG1OnCurve.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_IsG2OnCurve"):
executorBLS_IsG2OnCurve.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_GenerateKeyPair"):
executorBLS_GenerateKeyPair.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Decompress_G1"):
executorBLS_Decompress_G1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Compress_G1"):
executorBLS_Compress_G1.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Decompress_G2"):
executorBLS_Decompress_G2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_Compress_G2"):
executorBLS_Compress_G2.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G1_Add"):
executorBLS_G1_Add.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G1_Mul"):
executorBLS_G1_Mul.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G1_IsEq"):
executorBLS_G1_IsEq.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G1_Neg"):
executorBLS_G1_Neg.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G2_Add"):
executorBLS_G2_Add.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G2_Mul"):
executorBLS_G2_Mul.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G2_IsEq"):
executorBLS_G2_IsEq.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G2_Neg"):
executorBLS_G2_Neg.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("BLS_G1_MultiExp"):
executorBLS_G1_MultiExp.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("Misc"):
executorMisc.Run(ds, payload.data(), payload.size());
break;
case CF_OPERATION("SR25519_Verify"):
executorSR25519_Verify.Run(ds, payload.data(), payload.size());
break;
}
} catch ( Datasource::OutOfData& ) {
}
};
Driver::Driver(const Options options) :
options(options)
{ }
const Options* Driver::GetOptionsPtr(void) const {
return &options;
}
} /* namespace cryptofuzz */