To encrypt web communication, I use SSL with a RSA key with a length of 2048 bit, AES key's with a length of 256 bit and the ECDH-algorithm for the negotiation of the AES key's (or to exchange the DH-parameters to compute the AES key's).

As far as I understand, the RSA key pair's are only used the sign the messages for the negotiation of the common secret to encrypt the application data with AES (265 bit). Right?

My question: Which of these procedures got the most impact of the performance (cpu/ram) to encrypt a communication session with ssl? The signing of the DH-parameter by RSA by key-length? Or the AES encryption? How is the proportion to RSA signing by key length and AES encryption by key length?

  • 2
    performance impact of singin'?... Guess it depends on the tune! ;)
    – Mints97
    Commented Mar 4, 2015 at 14:38

1 Answer 1


The cost of encrypting data with AES is proportional to the size of such data. If you send 2 terabytes of data through your SSL connection, you will encrypt 2 terabytes of data and the cost of such encryption will completely dwarf anything that happens with RSA. On the other hand, if you send a single byte through your connection, the costs related to AES encryption will naturally be negligible with regards to RSA. So there cannot be any absolute answer to your question.

We can still say the following:

  • Unless you are developing code that runs on a smart card, both RSA and AES have negligible RAM costs.
  • AES-256 is theoretically 40% slower than AES-128, but there are other costs (e.g. the HMAC computations) so it can be predicted that the difference in performance between AES-256 and AES-128 will likely be lower. On the other hand, there is no real difference in security between AES-128 and AES-256; AES-256 may better promote your Alpha Male status when dealing with auditors and marketing people, though.
  • RSA signature time is roughly cubic in the key size (i.e. a twice larger key will mean eight times the CPU cost). This still depends on how the RSA implementation works, and asymptotic costs are always an approximation. It is useless to go beyond 2048 bits, unless, there again, you have to woo your harem into submission by your powerful display of an oversized RSA key.
  • Performance questions don't exist in abstracto. Performance is to be measured. On a real machine. Until measures have been made, there can be no performance issue, and discussing performance is just a way to spend time in meetings instead of actually, you know, working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .