Dear All i have developed a scheme for signcryption, i want to test the time taken for modular exponentiation. i am using the below code for signcryption part
start = time.clock()
gamma = pow(g , x, p)
print ('The value of gamma is : '),gamma
Time_signcrypt = time.clock() - start
and for unsigncryption part i am calculating the time taken with this line of code
start = time.clock()
seed = (XA + x - XA)
gamma_new = pow(g , seed, p)
Time_new_gamma = time.clock() - start
The problem is using the same values, the results i get from both the timing function is different.
Signcryption values:
0.035299674
0.025940017
Unsigncryption values:
0.019342944
0.01727206
The values should be same as the same function is applied at both ends with same parameters. Another important things is that in unsigncryption part , one step is additional but still the time taken is less than the signcryption part. I cant get it what is wrong i have tested almost 35 times and the results vary most of the times :(
Please advice where am i going wrong ?