Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 508 Bytes

README.md

File metadata and controls

10 lines (6 loc) · 508 Bytes

Attacks-on-Affine-Cipher

Brute-Force and Know Plain Text Attacks on Affine Cipher.

The affine cipher is a combination of additive cipher and multiplicative cipher (Link for more info https://www.geeksforgeeks.org/traditional-symmetric-ciphers/)

C = [(P * a) + b] mod n        # C = Chiper text , P = Plain text, n = 26 (length of alphabets)
P = [(C – b) * a^(-1) ] mod n     # (a,b) two keys are used for Affine Cipher.

Commented Code for better understanding and Created using Colaboratory.