项目作者: Lelouche01

项目描述 :
A Python Tool Performs Both Encryption And Decryption Using Affine Cipher
高级语言: Python
项目地址: git://github.com/Lelouche01/AffineCipher.git
创建时间: 2021-05-23T20:38:50Z
项目社区:https://github.com/Lelouche01/AffineCipher

开源协议:

下载



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.

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

Guide

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

Contact Me