https://123dok.net/document/zkw0lgd8-simulator-evaluating-leakage-arithmetic-circuits.html