Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
cycle_group.fuzzer.hpp File Reference

Go to the source code of this file.

Classes

class  CycleGroupBase< Builder >
 The class parametrizing CycleGroup fuzzing instructions, execution, etc. More...
 
class  CycleGroupBase< Builder >::Instruction
 
struct  CycleGroupBase< Builder >::Instruction::Element
 
struct  CycleGroupBase< Builder >::Instruction::TwoArgs
 
struct  CycleGroupBase< Builder >::Instruction::MulArgs
 
struct  CycleGroupBase< Builder >::Instruction::ThreeArgs
 
struct  CycleGroupBase< Builder >::Instruction::FourArgs
 
struct  CycleGroupBase< Builder >::Instruction::BatchMulArgs
 
struct  CycleGroupBase< Builder >::Instruction::ArgumentContents
 
class  CycleGroupBase< Builder >::ArgSizes
 
class  CycleGroupBase< Builder >::InstructionWeights
 Optional subclass that governs limits on the use of certain instructions, since some of them can be too slow. More...
 
class  CycleGroupBase< Builder >::Parser
 Parser class handles the parsing and writing the instructions back to data buffer. More...
 
class  CycleGroupBase< Builder >::ExecutionHandler
 This class implements the execution of cycle group with an oracle to detect discrepancies. More...
 

Macros

#define HAVOC_TESTING
 
#define MONT_CONVERSION
 
#define INV_MONT_CONVERSION
 
#define MONT_CONVERSION_SCALAR
 
#define INV_MONT_CONVERSION_SCALAR
 
#define PUT_RANDOM_BYTE_IF_LUCKY(variable)
 

Functions

size_t LLVMFuzzerMutate (uint8_t *Data, size_t Size, size_t MaxSize)
 
int LLVMFuzzerInitialize (int *argc, char ***argv)
 
size_t LLVMFuzzerTestOneInput (const uint8_t *Data, size_t Size)
 Fuzzer entry function.
 

Variables

bool circuit_should_fail = false
 
FastRandom VarianceRNG (0)
 
constexpr size_t MINIMUM_MUL_ELEMENTS = 0
 
constexpr size_t MAXIMUM_MUL_ELEMENTS = 8
 

Macro Definition Documentation

◆ HAVOC_TESTING

#define HAVOC_TESTING

Definition at line 21 of file cycle_group.fuzzer.hpp.

◆ INV_MONT_CONVERSION

#define INV_MONT_CONVERSION
Value:
if (convert_to_montgomery) { \
e.scalar = ScalarField(value_data).from_montgomery_form(); \
} else { \
e.scalar = ScalarField(value_data); \
}

◆ INV_MONT_CONVERSION_SCALAR

#define INV_MONT_CONVERSION_SCALAR
Value:
if (convert_to_montgomery) { \
e = ScalarField(value_data).from_montgomery_form(); \
} else { \
e = ScalarField(value_data); \
}

◆ MONT_CONVERSION

#define MONT_CONVERSION
Value:
if (convert_to_montgomery) { \
value_data = uint256_t(e.scalar.to_montgomery_form()); \
} else { \
value_data = uint256_t(e.scalar); \
}

◆ MONT_CONVERSION_SCALAR

#define MONT_CONVERSION_SCALAR
Value:
if (convert_to_montgomery) { \
value_data = uint256_t(e.to_montgomery_form()); \
} else { \
value_data = uint256_t(e); \
}

◆ PUT_RANDOM_BYTE_IF_LUCKY

#define PUT_RANDOM_BYTE_IF_LUCKY (   variable)
Value:
if (rng.next() & 1) { \
variable = rng.next() & 0xff; \
}

Function Documentation

◆ LLVMFuzzerInitialize()

int LLVMFuzzerInitialize ( int *  argc,
char ***  argv 
)

This is used, when we need to determine the probabilities of various mutations. Left here for posterity

Write mutation settings to log

Definition at line 1640 of file cycle_group.fuzzer.hpp.

◆ LLVMFuzzerMutate()

size_t LLVMFuzzerMutate ( uint8_t *  Data,
size_t  Size,
size_t  MaxSize 
)

◆ LLVMFuzzerTestOneInput()

size_t LLVMFuzzerTestOneInput ( const uint8_t *  Data,
size_t  Size 
)

Fuzzer entry function.

Definition at line 1763 of file cycle_group.fuzzer.hpp.

Variable Documentation

◆ circuit_should_fail

bool circuit_should_fail = false

Definition at line 25 of file cycle_group.fuzzer.hpp.

◆ MAXIMUM_MUL_ELEMENTS

constexpr size_t MAXIMUM_MUL_ELEMENTS = 8
constexpr

Definition at line 56 of file cycle_group.fuzzer.hpp.

◆ MINIMUM_MUL_ELEMENTS

constexpr size_t MINIMUM_MUL_ELEMENTS = 0
constexpr

Definition at line 55 of file cycle_group.fuzzer.hpp.

◆ VarianceRNG

FastRandom VarianceRNG(0) ( )