I want to compare two cryptographic algorithms. The first algorithm is RSA, and second algorithm is ElGamal elliptic curve cryptography. Now, I’m looking for a way to compare the speed of the two algorithms (time needed to complete calculations).

Someone told me about computing “time complexity”. Is that really an advisable way to compare things?

  • $\begingroup$ Don't compute, measure. And check out bench.cr.yp.to which lists performance of both DH on different groups and RSA. Though I heard that the RSA implementation they use might be rather slow. $\endgroup$ – CodesInChaos Jan 21 '13 at 12:28
  • $\begingroup$ Write a sample program that makes note of the current time, do the encryption, then make note of the time a second time. You should be able to compute the time it takes for each algorithm. $\endgroup$ – ponsfonze Jan 21 '13 at 17:10
  • $\begingroup$ Compute time it isn't good measured. because give me time variable each runtime program. I want know. Is calculate Time Complexity good measured. I want link for any book to learn me. Thanks for all. $\endgroup$ – almodawan Jan 21 '13 at 18:15
  • $\begingroup$ Is there general way to calculate speed performance for encrypt and decrypt.to be able to compare between any two algorithms in terms of speed? I need that for my thesis. $\endgroup$ – almodawan Jan 21 '13 at 18:25
  • $\begingroup$ No, there isn't. Big-O complexity is asymptotic - in addition to being an average - and is generally not accurate for realistic key sizes. In addition, some theoretically fast algorithms are terribly slow because they are not amenable to an efficient implementation, etc.. your best bet is to measure it, IMHO. $\endgroup$ – Thomas Jan 22 '13 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.