I programming RSA algorithm is the following two function in java language in my thesis
time_one = 0
private void encrypt()
{
M = new BigInteger(64,random);
C = M.modPow(e,N);
}
time_encrypt = time_now-time_one
time_two = 0
private void decrypt()
{
Mp = C.modPow(dp, p);
Mq = C.modPow(dq, q);
MM = Mp.multiply(q).multiply(q.modInverse(p))).add(Mq.multiply(p).multiply(p.modInverse(q)))).mod(N);
}
time_decrypt = time_now-time_two
Now I ask about runtime How can determine time encrypt for data size 1kb and 2kb to 10 kb. My second question Is that method to calculate run time good for compared speed runtime for encrypt and decrypt time?