intro
Using Modular arithmetic:
encryption: y=ax+b mod26y=ax+b \text{ mod} 26y=ax+b mod26
decryption: x=a−1(y−b) mod26x=a^{-1}(y-b) \text{ mod} 26x=a−1(y−b) mod26
aaa has to be Coprime with 262626 (i.e. gcd(a,26)=1gcd(a,26)=1gcd(a,26)=1 for a−1a^{-1}a−1 to exist
Key space is small, so Brute-force attack is very easy, and also frequency analysis. So it's not secure