Skip to content

Commit

Permalink
Round up rp to nearest multiple of t
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Feb 24, 2024
1 parent a8232d6 commit 39c59b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generator/generate_params_poseidon.sage
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 39c59b5

Please sign in to comment.