From 39c59b520c44d1c94ac95fc0789db4910a39f25e Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Fri, 23 Feb 2024 19:52:33 -1000 Subject: [PATCH] Round up rp to nearest multiple of t --- generator/generate_params_poseidon.sage | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/generate_params_poseidon.sage b/generator/generate_params_poseidon.sage index 6f91e65..327504f 100644 --- a/generator/generate_params_poseidon.sage +++ b/generator/generate_params_poseidon.sage @@ -106,6 +106,8 @@ def find_FD_round_numbers(p, t, alpha, M, cost_function, security_margin): R_F = ceil(R_F_t) min_cost = cost max_cost_rf = R_F + # round up to multiple of t: + R_P = (R_P+t-1)//t*t return (int(R_F), int(R_P)) def calc_final_numbers_fixed(p, t, alpha, M, security_margin):