Commit 5bc53498 authored by GUILLEVIC Aurore's avatar GUILLEVIC Aurore

estimate cost pairing with only one decimal digit precision

parent 7c7ed08f
......@@ -565,9 +565,10 @@ def pairingCost(C):
time_m = finite_field_cost(logp)
tot_miller = costMiller[-1]
time_miller = round(tot_miller * time_m/1000000, 2)
significant_dd = 1
time_miller = tot_miller * time_m/1000000
tot_expo = costFinalExp
time_expo = round(tot_expo * time_m/1000000, 2)
time_expo = tot_expo * time_m/1000000
return dict(
k=polymorphic_get_embedding_degree(C),
D=polymorphic_get_fD(C),
......@@ -575,11 +576,11 @@ def pairingCost(C):
logp=polymorphic_get_logp(C),
time_m=time_m,
tot_miller=tot_miller,
time_miller=time_miller,
time_miller=round(time_miller, significant_dd),
tot_expo=tot_expo,
time_expo=time_expo,
time_expo=round(time_expo, significant_dd),
tot_pairing = tot_miller + tot_expo,
time_pairing = round(time_miller+time_expo, 2),
time_pairing = round(time_miller+time_expo, significant_dd),
)
def table_cost_pairing() :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment