maths/circuits
This module contains code to do arithmetic circuit logic on integers. All values are assumed to be positive and p is a prime.
Functions
Performs a logical AND operation on two integer values within an arithmetic circuit.
circuits.and_(1, 1, p)
Performs a logical OR operation on two integer values within an arithmetic circuit..
circuits.or_(0, 1, p)
Performs a logical NOT operation on an integer value within an arithmetic circuit.
circuits.not_(1, p)
Performs a logical XOR operation on two integer values within an arithmetic circuit.
circuits.xor_(0, 1, p)
Performs a logical NAND operation on two integer values within an arithmetic circuit.
circuits.nand_(1, 1, p)
Performs a logical NOR operation on two integer values within an arithmetic circuit.
circuits.nor_(0, 0, p)
Performs a logical XNOR operation on two integer values within an arithmetic circuit.
circuits.xnor_(1, 1, p)