operators.md - Open-CP/OCP GitHub Wiki

Operators

OCP supports multiple cryptographic operators, implemented in the OCP/operators/operators.py file. For each operator, the corresponding Python code, C code, MILP model, SAT model, and CP model are provided. Additionally, the tool supports various model versions for each operation, which are detailed in their respective sections. The table below summarizes the currently implemented operators:

Operations Implementation MILP Model SAT Model CP Model
Equal Python, C diff, truncated_diff diff, truncated_diff Planned
Rot Python, C diff diff Planned
Shift Python, C diff diff Planned
ModAdd Python, C diff diff Planned
bitwiseAND Python, C diff diff Planned
bitwiseOR Python, C diff diff Planned
bitwiseXOR Python, C diff, truncated_diff diff, truncated_diff Planned
bitwiseNOT Python, C diff diff Planned
Sbox Python, C diff, truncated_diff diff, truncated_diff Planned
N_XOR Python, C diff diff Planned
Matrix Python, C diff, truncated_diff diff Planned
ConstantAdd-xor Python, C diff diff Planned
ConstantAdd-modadd Python, C Planned Planned Planned
ModMul Python, C Planned Planned Planned
bitwiseANDXOR Python, C diff Planned Planned
AESround Python, C diff, truncated_diff diff Planned