Category: Uncategorized
-
A complete idiot’s introduction to HMAC
Suppose Alice sends a message to Bob that says “pay Chloe $10”. Alice and Bob could be banks communicating, and Chloe is a customer. The message is sent over the Internet. One issue with a message being sent like this is that a transmission error could change the message and there’s no way to detect…
-
Matrix Diagonalisation in Python
Working with matrices involves finding their inverse, determinant, multiplying them and often exponentiating them. All these operations, particularly exponentiation (raising a matrix to the n’th power), are a lot less computationally expensive to do on a diagonal matrix. Suppose we want to multiply two matrices A and B: $$\definecolor{blue}{RGB}{39,111,191}\definecolor{red}{RGB}{242,54,2}\begin{bmatrix}\color{blue}a_1 & \color{blue}b_1 \\\color{blue}a_2 & \color{blue}b_2 \\\end{bmatrix}…