nil::crypto3::zk::snark::tbcs_gate Struct Reference

#include <tbcs.hpp>

+ Collaboration diagram for nil::crypto3::zk::snark::tbcs_gate:

Public Member Functions

bool evaluate (const tbcs_variable_assignment &input) const
bool operator== (const tbcs_gate &other) const

Public Attributes

bool is_circuit_output
tbcs_wire_t left_wire
tbcs_wire_t output
tbcs_wire_t right_wire
tbcs_gate_type type

Detailed Description

A TBCS gate is a formal expression of the form

           g(left_wire,right_wire) = output ,

where 'left_wire' and 'right_wire' are the two input wires, and 'output' is the output wire. In other words, a TBCS gate is a 2-input boolean gate; there are 16 possible such gates (see tbcs_gate_type above).

A TBCS gate is used to construct a TBCS circuit (see below).

Member Function Documentation

◆ evaluate()

bool nil::crypto3::zk::snark::tbcs_gate::evaluate ( const tbcs_variable_assignment input) const

This function is very tricky. See comment in tbcs.hpp .

◆ operator==()

bool nil::crypto3::zk::snark::tbcs_gate::operator== ( const tbcs_gate other) const

Member Data Documentation

◆ is_circuit_output

bool nil::crypto3::zk::snark::tbcs_gate::is_circuit_output

◆ left_wire

tbcs_wire_t nil::crypto3::zk::snark::tbcs_gate::left_wire

◆ output

tbcs_wire_t nil::crypto3::zk::snark::tbcs_gate::output

◆ right_wire

tbcs_wire_t nil::crypto3::zk::snark::tbcs_gate::right_wire

◆ type

tbcs_gate_type nil::crypto3::zk::snark::tbcs_gate::type

The documentation for this struct was generated from the following file: