Skip to content

Crypto Python: A python package for symmetric and asymmetric encryption/decryption and key exchange.

License

Notifications You must be signed in to change notification settings

omermujtaba18/cp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Python

A python package for Encryption/Decryption

Crypto Algorithms

  • Caeser Cipher
  • Substitution Cipher
  • Deffie-Hellman Key Exchange

How to use

Caeser Cipher
from cp.<caeser,substitution> import encrypt,decrypt

plaintext = "Hello World"

ciphertext = encrypt(plaintext,key=1)
plaintext = decrypt(ciphertext,key=1)
Substitution Cipher
from cp.substitution import encrypt,decrypt,generate_key

plaintext = "Hello World"

key = generate_key()
ciphertext = encrypt(plaintext,key)
plaintext = decrypt(ciphertext,key)