2009-08-03 13:05



I am interested in help selecting one of the common symmetric encryption algorithms (Twofish, AES, etc) based on performance criteria (fastest encryption/decryption). We are currently leaning toward AES, but since the communications we are sending back and forth don't really need that level of encryption, a less secure algorithm would be acceptable for a performance gain.

We will be using the selected algorithm to encrypt/decrypt messages (should be no longer than 200 characters) that are being sent between the client and server (Javascript client and PHP on the server) over HTTPS. The speed of the algorithm is important because the encryption/decryption process will need to keep up with messages as they arrive/depart via sockets on the server.

I have found one site that has benchmarks for encryption and I plan to do my own testing, but I was hoping for input from SO on selecting an encryption for speed. Thanks in advance for any help.

EDIT: Please note that the message will not be sent over HTTPS, they will be sent over HTTP

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • duanben1324 duanben1324 12年前

    It depends on the implementation. One of the reasons Rijndael was the final chosen AES algorithm was due to speed, size and simplicity, so most implementations will be good but other implementations may be slower.

    Choose your implementation, then benchmark. If you're looking at rolling-your-own implementation, then your benchmark figures may be completely different from what other third-party implementations.

    点赞 评论 复制链接分享
  • dongshan2680 dongshan2680 12年前

    It would be way faster, easier and reliable (security-wise) to use HTTPS encryption for your transfers. It's completely transparent on the client-side, and will most likely have way better performances than your Javascript AES decrypting code.

    点赞 评论 复制链接分享