Skip to content

Rolandogarciam/affine-cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AffineCipher

The affine cipher is a type of substitution cipher, use a shift and decimation key to construct the cipher alphabet.

Formula

  c = (a * m + b) mod n
  m = ((c - b) * inv(a, n)) mod n

Usage

Generate the stdin.txt with the plaintext or ciphertext.

Encrypt

python main.py -a 4 -b 8 --cipher

Decrypt

python main.py --decipher

About

Encrypt and Decrypt plaintext using Affine Cipher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages