Tell me more ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question
cross posted stackoverflow.com/questions/14539501/… – CodesInChaos Jan 26 at 17:34

closed as off topic by CodesInChaos, Thomas, PaĆ­lo Ebermann Jan 29 at 19:31

Questions on Cryptography Stack Exchange are expected to relate to cryptography within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.