If I have understood correctly, Twofish is more secure (harder to break) than AES and Camellia, but it's slower than both.

How can I measure the speed difference between AES vs Twofish and Camellia vs Twofish? Does Twofish use twice as much time? Half as much time? Or does it just take a few percent longer to encrypt/decrypt than AES/Camellia?

I'm in the starting/planning phase of software development: the local stored data will be encrypted, and the data to be transmitted over a network will be encrypted/signed. I would like to use Twofish as the symmetric cipher, but if it uses twice the resources of AES/Camellia, then it's not a good idea.

  • $\begingroup$ The final speed of ciphers depend on their implementation. If you want to perform a good comparison instead of hand-waving, you should compare the algorithms on a reference system using the algorithm implementations of your choice. If you're really serious about speed, you're more likely to find AES hardware implementations (e.g. AES-NI or ARM instructions) than Twofish implementations. $\endgroup$
    – Maarten Bodewes
    Commented Apr 28, 2016 at 22:22
  • $\begingroup$ While I am a fan of Twofish for max security, AES on modern processors will be substantially faster, at least 5 times, maybe 10 times faster $\endgroup$ Commented Apr 29, 2016 at 1:00
  • $\begingroup$ @RichieFrame Generally I'm using AES, but in some cases speed is not an issue. Or I have content encrypted with a specific cipher and need to decrypt that. $\endgroup$
    – RocketNuts
    Commented Sep 14, 2020 at 14:03

1 Answer 1


Just use AES. It's hardware-accelerated and implementations have had ages to have flaws discovered and patched. More strongly, just use GPG to encrypt data at rest and just use TLS (>= 1.2, with appropriate AEAD ciphers) for data in motion. "If you're typing the letters A-E-S into your code, you're doing it wrong."

Anything you build yourself is infinitely more likely to be broken as a result of your design choices than by your choice of cipher.

  • $\begingroup$ To be clear: If you choose to use the more advanced features of GPG (e.g. public key encryption) you should consider that your software most certainly won't work with standard Java / PKCS#11 / CAPI / CNG crypto hardware which may become a (serious) problem once you scale it to enterprise level. Using S/MIME (instead of PGP) would be the far more well-supported alternative if you want to use public key cryptography. $\endgroup$
    – SEJPM
    Commented Apr 28, 2016 at 21:52
  • $\begingroup$ Yes in any typical situation I'd always use AES. But there are some cases where I need some of the other ciphers. Specifically if I receive encrypted data from a 3rd party source and I need to decrypt that. Also, in some cases I'd like to be able to combine ciphers, e.g. AES + Serpent + Threefish. I mean just like how TrueCrypt used to do with cascaded encryption. In the purely hypothetical scenario where (in the distant future) one would be broken or become vulnerable after an attack is developed, the other layer of encryption is still in place. $\endgroup$
    – RocketNuts
    Commented Sep 14, 2020 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.