r1cs

from https://github.com/ethereum/research/blob/master/zksnark/code_to_r1cs.py ref: https://medium.com/@VitalikButerin/quadratic-arithmetic-programs-from-zero-to-hero-f6d558cea649

Module Contents

Classes

R1CS

Functions

insert_var(arr, varz, var, used, reverse=False)

get_var_placement(inputs, flatcode)

flatcode_to_r1cs(inputs, flatcode, field=int)

grab_var(varz, assignment, var)

assign_variables(inputs, input_vars, flatcode, field)

code_to_r1cs_with_inputs(code, input_vars, field)

mul(a, b)

r1cs.insert_var(arr, varz, var, used, reverse=False)
r1cs.get_var_placement(inputs, flatcode)
r1cs.flatcode_to_r1cs(inputs, flatcode, field=int)
r1cs.grab_var(varz, assignment, var)
r1cs.assign_variables(inputs, input_vars, flatcode, field)
r1cs.code_to_r1cs_with_inputs(code, input_vars, field)
r1cs.mul(a, b)
class r1cs.R1CS
static parse(code, input_vals, field=int)
static verify(s, A, B, C)
static r1cs(fn_or_field=int, ctx={})