|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Witness-generating implementation of bitwise AND/OR/XOR operations. More...
#include <bitwise.hpp>
Public Member Functions | |
| Bitwise (EventEmitterInterface< BitwiseEvent > &event_emitter) | |
| MemoryValue | and_op (const MemoryValue &a, const MemoryValue &b) override |
| Perform bitwise AND on two tagged memory values. | |
| MemoryValue | or_op (const MemoryValue &a, const MemoryValue &b) override |
| Perform bitwise OR on two tagged memory values. | |
| MemoryValue | xor_op (const MemoryValue &a, const MemoryValue &b) override |
| Perform bitwise XOR on two tagged memory values. | |
Public Member Functions inherited from bb::avm2::simulation::BitwiseInterface | |
| virtual | ~BitwiseInterface ()=default |
Private Attributes | |
| EventEmitterInterface< BitwiseEvent > & | events |
Witness-generating implementation of bitwise AND/OR/XOR operations.
Definition at line 13 of file bitwise.hpp.
|
inline |
| event_emitter | Destination for BitwiseEvent emissions consumed by tracegen. |
Definition at line 18 of file bitwise.hpp.
|
overridevirtual |
Perform bitwise AND on two tagged memory values.
On success, emits a BitwiseEvent with the computed result and returns it. On error (FF tag or tag mismatch), emits the event with res=0, then throws.
| a | Left operand. |
| b | Right operand. |
| BitwiseException | If either tag is FF or tags don't match. |
Implements bb::avm2::simulation::BitwiseInterface.
Definition at line 20 of file bitwise.cpp.
|
overridevirtual |
Perform bitwise OR on two tagged memory values.
On success, emits a BitwiseEvent with the computed result and returns it. On error (FF tag or tag mismatch), emits the event with res=0, then throws.
| a | Left operand. |
| b | Right operand. |
| BitwiseException | If either tag is FF or tags don't match. |
Implements bb::avm2::simulation::BitwiseInterface.
Definition at line 43 of file bitwise.cpp.
|
overridevirtual |
Perform bitwise XOR on two tagged memory values.
On success, emits a BitwiseEvent with the computed result and returns it. On error (FF tag or tag mismatch), emits the event with res=0, then throws.
| a | Left operand. |
| b | Right operand. |
| BitwiseException | If either tag is FF or tags don't match. |
Implements bb::avm2::simulation::BitwiseInterface.
Definition at line 66 of file bitwise.cpp.
|
private |
Definition at line 27 of file bitwise.hpp.