# AES vs other types of encryption such as Twofish

I am kinda of confused about what are some major differences between AES, Twofish, and other types of common encryption algorithms.

• High level differences can be found here – Milap Feb 5 '17 at 5:02
• I think you should refine your question to just the diferences between AES and Twofish, else you should more strongly define the scope. 'Other types of common encryption algorithms' could probably fill a textbook or two. – Chris Feb 5 '17 at 10:41
• I've got the feeling that you place AES in a category of its own. That's not the case, it is an algorithm with a common structure (by now) and doesn't contain technologies that aren't found within other ciphers. Oh, almost forgot the movie quote: "There is no secret ingredient". – Maarten - reinstate Monica Feb 5 '17 at 15:54

## 2 Answers

Rijndael (aka AES) and Twofish were both candidates and finalists for the Advanced Encryption Standard contest, a three year selection process which yielded the selection of Rijndael as the standard.

Contest submissions were required to be block ciphers of block size 128 bits and support key sizes of 128,192 and 256 bits. Submissions were put through rounds of cryptanalysis and assessment by prominent members of the cryptographic community. NIST, the competition organiser, made the final decision that Rijndael would become the AES.

At a high level both AES and Twofish are 128 bit block ciphers supporting 128,192 and 256 bit key sizes. Both ciphers are (despite a small number of theoretical attacks) secure in the computational/pragmatic sense that nobody has yet found a way to break them. Both ciphers are based on heuristic constructions, meaning that we don't have a proof of security showing a reduction to some known hard problem, instead their security is based on the fact that nobody has broken them yet. Both ciphers satisfy the pseudorandom permutation (PRP) function model in that their output cannot be distinguished from a random permutation in the block size.

High-level differences between the ciphers are that AES and Twofish are based on a substitution-permutation network (SPN) and a Feistel-network respectiveley. These networks are applied in rounds where AES has 10,12 or 14 rounds depending on the key-size, Twofish always applies 16 rounds.

• Also important, Twofish has key dependent s-boxes and a very complex and expensive key schedule, wheras AES has a very fast and simple key schedule – Richie Frame Feb 6 '17 at 12:08
• @RichieFrame Afaik. the 128bit and the 256bit AES have different key schedules and the 256bit is weaker. There is an interesting blog post and discussion about this here: schneier.com/blog/archives/2009/07/another_new_aes.html – inf3rno Jan 28 '18 at 16:18

Aes is based on elliptical curve and abstract mathematics such as groups and fields. Twofish isn't. Aes is commonly used by most https servers and is recognized by ssl or tls, twofish isn't.

• AES is not based on elliptical curves neither is it 'based on abstract mathematics such as groups and fields', AES is a heuristic block cipher based on a substitution-permutation network construction. It's security cannot be reduced to any known 'hard' mathematical problem like the public-key techniques based on problems on elliptic curves or other abstract algebraic structures. – Chris Feb 5 '17 at 10:29
• @Chris Aes does use finite fields, also obviously implying a group structure. I can not verify that the field is/are the one having addition operation which involves diaphante solutions right now cause I'm at work but next time before bombarding an answer with negative votes when it is at least partially correct, try actually reading the standards instead of superficially glancing through Wikipedia, thanks. – marshal craft Feb 5 '17 at 12:04
• I'm sorry that you feel your contribution has been unfairly criticised. It is my understanding that AES is not 'based' on elliptic curve cryptography, at least not premeditatively. AES and Twofish both operate in the $\mathbb{F}_{2}8$ finite field so I'm unconvinced by the distinction you drew on that basis. Happy to discuss further :) – Chris Feb 5 '17 at 12:28
• @Chris AES is based on "abstract mathematics such as groups and fields": There is no shortage of mention of Rijndael's finite field. This is the "algebraic structure" that you hear about so frequently in the context of AES. May I ask for a reference as to why you believe it is not? (It is not based on elliptic curves, however...) – Ella Rose Feb 5 '17 at 18:16
• @Ella Rose I agree. I was incorrect in my initial comment. AES is based on operations in $\mathbb{F}_{2}8$ (so is Twofish) – Chris Feb 5 '17 at 18:43