> Mathematical Background
> Before we tackle cryptography we need to cover some basic facts from mathematics.
Nit: we really don't. This reminds me of how dry and uninspired the cryptography and cryptology (less so) classes I took almost 20 years ago were.
But, when learning any cryptographic scheme, in order to understand what is going on, it is certainly necessary to learn the corresponding mathematical tools. Even to define what it means for a scheme to be secure requires a good grasp of probability (and negligible functions in the asymptotic regime).
It’s my understanding that every cryptographic algorithm is based on math, much of it not so simple.
There's two strategies: substitution and permutations. Substitutions is when you replace a set of bits with another set of bits (ex: ABCD might become IAQN). Permutations is when you move bits around (ex: ABCD might become CADB).
When you mix substitutions with permutations, and then loop like 10+ times, it becomes really hard to follow. Bam, cryptography algorithms.
----------
How do you build substitutions and permutations that are hard to follow? Well, it seems like substitutions are the hard one, permutations seem relatively straight forward to me in most block ciphers (AES is really easy: a rotation to the right, and then a column-wide rotation. All of the bytes are in a 4x4 matrix, for the 16-bytes. Its actually super easy to follow AES's permutation steps).
Substitutions need to be done in such a way that is resistant to pattern-matching / cryptoanalysis. Choosing random numbers is not sufficient. For this, we enter "math", such as galois fields.
Galois Fields looks complex, but that's only because you haven't learned them yet. All a Galois Field is... is a set of numbers (such as 0, 1, 2, 3, 4, in the GF(5) field) that have addition, addition-inverse, multiplication, and multiplication-inverse.
Note: Galois Fields manage to accomplish this by reinventing the definition of addition and multiplication. Ignoring this... weirdness... its rather straight forward. Every operation can be inverted (not just addition and multiplication... but also complex algorithms like exponents, logarithms, square roots and more).
Once we're assured that both addition and multiplication can be perfectly inverted, we can build substitutions that are perfect... and then use math to prove that it should be hard to invert (though always possible to invert, due to both addition and multiplication having inverting-steps).
Proving that these things are "hard to reverse" with cryptoanalysis is beyond the scope of most student's study. So Cryptography courses go into Galois fields but forget to tell you why the hell you're studying it in the first place.
--------
In practice, we just show off AES's S-box (substitution box), that says which bytes get replaced with new bytes. And vice versa (https://en.wikipedia.org/wiki/Rijndael_S-box).
The GF(2^8) extension field just is a complex way of saying 8-bit numbers using this weird "addition-changed / multiplication-changed" math system that has guarantees of reversal / invertions.
Here's a discussion of cryptography that has 0 occurrences of "ring" (for example): https://en.wikipedia.org/wiki/Cryptography
I find Internet Archive's first capture in 2013: <https://web.archive.org/web/20230000000000*/https://www.cs.u...>
$ curl -s --head https://www.cs.umd.edu/~waa/414-F11/IntroToCrypto.pdf | grep last-modified
last-modified: Wed, 07 Sep 2011 17:07:09 GMTThis is the class that links to the book. Fall 2011
That's the author's page for the book. The 3rd edition was originally published in 2008 and last updated in 2013. He has another book (linked from that page) which, from browsing the TOC, appears to cover the same or similar material but was published in 2015.
https://www.goodreads.com/book/show/56242724-codebreaking
Though that doesn't appear to be a code repo.
https://github.com/NigelSmart/nigelsmart.github.io/tree/mast...
There are also some basic practical exercises (I don't believe the projects are technically related, but are in similar veins): https://cryptopals.com/
I found it had a nice balance of theory and application.
It goes more in depth of understanding mathematics behind but less in scope — there are no elliptic curves, for example.