Skip to content

This tool is a versatile implementation of the Affine Cipher, a classical encryption algorithm that combines modular arithmetic and linear algebra. It enables users to encode and decode messages using a pair of keys, offering a straightforward and effective approach to securing information.

Notifications You must be signed in to change notification settings

amaitou/AffineCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation


Albert_Einstein_Head_H3000x1688


What is Affine Cipher?

as Wikipedia says: The affine cipher is a type of monoalphabetic substitution cipher, where each letter in an alphabet is mapped to its numeric equivalent, encrypted using a simple mathematical function, and converted back to a letter.

Formula

  C = (a * P + b) mod 26
  P = (a ^ -1 * (C - b)) mod 26

Guide

 ! Usage: python3 affinecipher.py <type> <string> <a> <b>
  
* type    : {e: encryption, d: decryption}
* string  : the text you want to encrypt or decrypt
* a       : the first operand of the key
* b       : the second operand of the key

Contact Me

About

This tool is a versatile implementation of the Affine Cipher, a classical encryption algorithm that combines modular arithmetic and linear algebra. It enables users to encode and decode messages using a pair of keys, offering a straightforward and effective approach to securing information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages