This repository primarily focuses on the starky implementation of scalar multiplication on the bn254 curve, and provides various utility functions for elliptic curves on the bn254 curve.
let mut builder = CircuitBuilder::<F, D>::new(CircuitConfig::default());
let scalar = builder.add_virtual_biguint_target(8);
let x = G1Target::new_checked(&mut builder);
let offset = G1Target::new_checked(&mut builder);
let output = builder.g1_scalar_mul::<C>(scalar, x, offset);
let mut builder = CircuitBuilder::<F, D>::new(CircuitConfig::default());
let scalar = builder.add_virtual_biguint_target(8);
let x = FqTarget::new_checked(&mut builder);
let offset = G2Target::new_checked(&mut builder);
let output = builder.g2_scalar_mul::<C>(scalar, x, offset);
let mut builder = CircuitBuilder::<F, D>::new(CircuitConfig::default());
let scalar = builder.add_virtual_biguint_target(8);
let x = FqTarget::new_checked(&mut builder);
let output = builder.fq_exp::<C>(s, x)
let mut builder = CircuitBuilder::<F, D>::new(config);
let input_t = Fq2Target::constant(&mut builder, &input);
let output_t = G2Target::map_to_g2_circuit::<C>(&mut builder, &input_t);
This project is licensed under the MIT License.