
Explore the theory and practice of symmetric block ciphers and rc5. Implement rc5 in Rust using generics and native types, with cbc mode tests from the original paper.
Explore a simplified map of cryptography, distinguishing symmetric and asymmetric ciphers, protocols, and cryptanalysis, with examples like RSA, elliptic curves, and sha-256 hashing.
Differentiate stream ciphers from block ciphers, highlighting diffusion and confusion across rounds in block ciphers. Note XOR and pseudo random generators underpin stream cipher security.
Discover how feistel networks use left and right halves and a round function to create confusion and diffusion. Understand why Ark5 uses a feistel-like structure and remains invertible for decryption.
Install rust and its toolchain, including rustup, rustc, and cargo, via a terminal script. Create a binary project, run cargo run to print hello world, and build in release mode.
Advance RC5 key expansion in Rust by converting a key byte array to a word array, defining the magic constants p and q, and initializing a vector of size t for the expansion.
Explore Rivest unit tests for RC5 with 32-bit words, a 16-byte key, and 12 rounds, plus discuss magic constants P_W and Q_W from irrational numbers and little-endian representation.
Fix an off-by-one error by using until b minus one in the Rivest unit test. Run the encryption and decryption tests to confirm all pass.
This course teaches you how to build an RC5 symmetric block cipher in Rust. If you are interested in learning cryptography or how to build practical applications in Rust, this course is definitely for you.
The course is divided into three main sections:
In the first one, we will explain the theory of symmetric encryption and block ciphers. We will see what diffusion and confusion mean, and we will look into the details of the RC5 block cipher.
In the second, we will implement the RC5 cipher using Rust. We will learn how, with Rust-Generics, we can extend the capabilities of the cipher to words of 32, 64, and 128 bits without duplicating code.
In the third one, we will implement a real-world application that uses the RC5 cipher and cipher block chaining mode to encrypt and decrypt large files.
I recommend you program the RC5 cipher by yourself as you look at the video and also to create your own Github Repository. This will serve as a showcase for your future employers that you know what you are talking about and that you have Rust and Cryptography experience. Most important of all I also recommend you to have fun and ask every question you have!