The Wikipedia article does refer to a great tutorial ( X-N20 ) written in C that guides you through Maths and provides a C implementation on the go, which is very useful for understanding the process. I also recommend reading the final field arithmetic .
Serpent and Twofish , skipping the name AES, are not well documented on the Internet. Remember that each of them provides reference implementations.
In fact, their implementation will require a study of their respective documents and, possibly, the source code.
Please note that your 20 billion comments are related to the fact that the NIST interface specified for AES was that each cipher provides a 128-bit (16-byte) input block and one of the 128-bit, 192-bit and 256-bit key blocks.
To safely encrypt in such a way as to properly resist cryptanalysis, you need some careful work. For example, what if a few bytes are missing in the last block? How do you put on a pillow? Similarly, depending on the intended use, other schemes exist, especially for large repetitive data, designed to counteract cryptanalysis when you know that the encrypted data probably contains the contents of c:\windows . What commentators strive for is that for any use in the real world, to stay safe, these things need to be considered.
Change Since there is another question in this question, here are some links:
- Brian Gladman ASM / C code for various cryptographic algorithms, including AES, SHA and Serpent.
- OpenSSL AES code in their CVS. See Also DES . They do not use the Snake. You can also see the rest of your code in the
crypto section. - Crypto ++ . If you can use C ++ and are only the end user of cryptography, then you need this library (tm). There are algorithms that I have never heard of. Their trunk line is SVN .
- libgcrypt provides a whole set of cryptographic functions for
gpg . In particular, if you are after AES, you may not find it here, but you will find camellias and snakes.
user257111
source share