This document provides a tutorial on linear and differential cryptanalysis. It summarizes the attacks and applies them to a simple substitution-permutation network cipher as an example. The tutorial explains how to construct linear expressions to exploit the nonlinear properties of the cipher's S-boxes. It also introduces the "piling-up principle", which shows that combining independent biased variables results in a cumulative bias according to a simple formula. The overall goal is to provide an intuitive explanation of these cryptanalysis techniques for novice cryptanalysts.