ref.: https://blog.finjan.com/rijndael-encryption-algorithm/amp/
As the Data Encryption Standard (DES) began to show signs of weakness after several years of use, and in the wake of a security crisis surrounding its Triple DES (3DES) variant, the U.S. National Institute of Standards and Technology (NIST) threw a challenge to cryptographers to develop a more resilient platform for the encryption of mission-critical data. What emerged above other contenders was the Rijndael encryption algorithm.
The Advanced Encryption Standard (AES)
Part of the U.S. Commerce Department's Technology Administration, the National Institute of Standards and Technology (NIST) is charged with strengthening the U.S. economy and improving the quality of life through the application of technologies, measurements, and standards in conjunction with industry.
Ensuring the integrity and safety of data transmissions is included within this remit, so when the security issues surrounding DES (which dates from 1977) and Triple DES became insurmountable, NIST selected five finalists from an initial short list of over 15 submissions to assess in establishing a new standard for the encryption of sensitive (unclassified) information at the federal level. These standards are frequently adopted for commercial applications.
Strong cases were presented by the MARS, RC6, Serpent and Twofish algorithms, but it was the Rijndael encryption algorithm which was eventually chosen as the standard symmetric key encryption algorithm to be used for this purpose. Its selection was formalized with the release of Federal Information Processing Standards Publication (FIPS PUB) 197, in November of 2001 after its approval by the U.S. Secretary of Commerce.
Origins of Rijndael
The algorithm was created by the Belgian cryptologists, Vincent Rijmen and Joan Daemen (working out of Kathlieke Universiteit Leuven and Proton World International respectively), from whose surnames the word "Rijndael" is derived. Rijndael has its origins in Square, an encryption algorithm previously designed by the pair, but was intended to improve upon that earlier attempt in accordance with three guiding principles:
- Resistance to all known attacks
- Speed and compactness of source code on a number of computing platforms
- Simplicity of design
Mechanics of the Rijndael Encryption Algorithm
Rijndael is a symmetric key encryption algorithm that's constructed as a block cipher. It supports key sizes of 128, 192 and 256 bits, with data handling taking place in 128-bit blocks. In addition, the block sizes can mirror those of their respective keys. This last specification puts Rijndael over the limits required for AES design conditions, and the Advanced Encryption Standard itself is looked upon as a subset of the Rijndael algorithm.
Of its three guiding principles, it's the last one – simplicity in comparison with the other algorithms under consideration – that gave Rijndael the edge over its rivals in selection for the Advanced Encryption Standard.
Though many discussions of the Rijndael algorithm attempt to bury the reader under a ton of incomprehensible figures, the actual mathematics of the process is relatively straightforward.
Doing the Rounds
Encryption under Rijndael is achieved through a series of matrix transformations. Not the movie – matrix functions, as in high school math. Each transformation is known as a round, and Rijndael uses a variable amount of them depending on the key or block sizes being employed.
- 9 rounds are used if the key or block size is 128 bits.
- 11 rounds of transformation are deployed if the key or block size is 192 bits.
- 13 rounds are involved if the key or block size is 256 bits.
Rijndael is a substitution cipher which uses a combination of three discrete and invertible layers, or uniform matrix transformations:
- The Linear Mix Transform
- The Non-linear Transform and
- The Key Addition Transform
Before the first transformation or round, a simple key addition layer is performed, which adds to the overall security of the process.
Nr-1 rounds are then performed, where Nr is the total number of rounds to be undertaken. This number depends on the length of the data block being encrypted, and the length of the encryption key being used.
In the final round, a Mix Column step is performed, where matrix multiplication is done with each column in the array resulting from the previous transformations being multiplied by the cipher matrix.
Considerations with Keys
The encryption key schedule for Rijndael simply requires that the key size be a multiple of 32 bits. So it's possible to use keys that are 160 or 224 bits in length. Block sizes of 160 or 224 bits are also supported.
This flexibility is allowed for in a revised specification for Rijndael which calls for 10 regular rounds of transformation (11 rounds in total) for 160 bits, and 12 regular rounds (13 rounds in total) for 224 bits.
Modifying the Square
The Square block cipher which Rijndael improved upon was vulnerable to a set of attacks known collectively as the Square attack. Resistance to this was worked in by substituting the Shift Row transformation for a transpose of the square matrix of bytes which allowed diffusion over an entire data block via alternating Mix Column and Mix Row transformations.
Stability Under Attack
Although all the candidates considered for the AES were secure under various forms of assault, Rijndael was chosen on account of its low memory requirements and overall efficiency.
Crypto-analysts generally agree that Rijndael will prove secure for all its real-world applications – and the process may be strengthened through the addition of more rounds of transformation. A limited number of attacks on the algorithm have succeeded, but these have been staged within laboratory conditions, and largely represent theoretical situations unlikely to occur in a business context.
In addition to its inherent security and stability to crypto-analysis, Rijndael is also noteworthy for its ability to run efficiently on a number of computing platforms, including large arrays, desktop systems, mobile devices, and smart cards.