The Affine Cipher

Introduction We will now tackle another encryption method called affine cipher. If by reading the word affine made you think of affine functions, you are already on the right track! This method uses an affine function to encrypt messages. Differently from the shift cipher that uses only addition, the affine cipher uses also multiplication, which makes our encryption more complex. If we recall how an affine function looks like, it takes an input $x$, multiply by a coefficient, $a$, and adds to a constant, $b$. ...

December 18, 2024 · 8 min · Bjørn

Extended Euclidean Algorithm and Modular Inverse

Introduction The next topic we will cover in mathematics foundations is the Extended Euclidean Algorithm (EEA) and modular inverse. In the topic Introduction to Modular Arithmetic we discussed that division is tricky in modular arithmetic. Today we are going to tackle this problem and see how division works and when we can use it. But first, we need to talk about greatest common divisor and the Euclidean Algorithm. So let’s take this step-by-step. ...

December 4, 2024 · 14 min · Bjørn