Skip to main content

A package for monoalphabetic ciphers (message encryption and decryption).

Project description

MonoCipher

MonoCipher

MonoCipher is python programmed package which allow users to encrypt and decrypt messages in three different levels

  1. Simple Cryption with Shift number
  2. Byte Cryption with an advance method of encryption and decryption with Initialization Vector (IV) and Cipher Text. more on IV
  3. Salt Cryption with advance method of encryption and decryption with Initialization Vector (IV), Cipher Text, Password and salt. more on salt

The core module used in the project is pycryptodome

To Use This Module

pip install MonoCipher

Features

Simple Encryption

  • This function encrypts decrypts message using shift method
  • This function takes an input of message and shift number | shift_encrypt(message, shift)
    For Decrypting the message the function takes as same | shift_encrypt(message, shift)

Byte Encryption

  • This encryption works in an advance method of encryption and decryption with Initialization Vector (IV) and Cipher Text. more on IV
  • This function takes an input of Message and Password and returns VI and Cipher Text | byte_encrypt(message, password)
  • For Decrypting the message the function takes VI, Cipher Text, and Password | byte_decrypt(iv, ciphertext, password)

Salt Encryption

  • This encryption works in an advance method of encryption and decryption with Initialization Vector (IV), Cipher Text, Password and salt. more on salt
  • This function takes an input of Message and Password and returns Salt, VI and Cipher Text | salt_encrypt(message, password)
    For Decrypting the message the function takes Salt, VI, Cipher Text, and Password | salt_decrypt(salt, iv, ciphertext, password)
  • On this process the encrypt function generates a 256-bit key | generate_key(password, salt)

Usage

Simple Encryption Module:

shift_encrypt:

Encrypts a message using a simple Caesar cipher with a specified shift value.

from MonoCipher.SimpleEncryption import shift_encrypt

message = "Hello, World!"
shift = 3

encrypted_message = shift_encrypt(message, shift)
print("Encrypted message:", encrypted_message)

shift_decrypt:

Decrypts a message encrypted with a Caesar cipher using the same shift value.

from MonoCipher.SimpleEncryption import shift_decrypt

encrypted_message = "Khoor, Zruog!"
shift = 3

decrypted_message = shift_decrypt(encrypted_message, shift)
print("Decrypted message:", decrypted_message)

Byte Encryption Module:

byte_encrypt:

Encrypts a message using AES encryption in CBC mode with a provided key.

from MonoCipher.ByteEncryption import byte_encrypt

message = "Hello, World!"
password = "MySecretPassword"

iv, ciphertext = byte_encrypt(message, password)
print("IV:", iv)
print("Ciphertext:", ciphertext)

byte_decrypt:

Decrypts a message encrypted with AES encryption using the same key and initialization vector (IV).

from MonoCipher.ByteEncryption import byte_decrypt
  
iv = "some_base64_encoded_iv"
ciphertext = "some_base64_encoded_ciphertext"
password = "MySecretPassword"

decrypted_message = byte_decrypt(iv, ciphertext, password)
print("Decrypted message:", decrypted_message)

Salt Encryption Module:

salt_encrypt:

Encrypts a message using AES encryption in CBC mode with a provided password and a random salt.

from MonoCipher.SaltEncryption import salt_encrypt

message = "Hello, World!"
password = "MySecretPassword"

salt, iv, ciphertext = salt_encrypt(message, password)
print("Salt:", salt)
print("IV:", iv)
print("Ciphertext:", ciphertext)

salt_decrypt:

Decrypts a message encrypted with AES encryption using the same password and salt.

from MonoCipher.SaltEncryption import salt_decrypt

salt = "some_base64_encoded_salt"
iv = "some_base64_encoded_iv"
ciphertext = "some_base64_encoded_ciphertext"
password = "MySecretPassword"

decrypted_message = salt_decrypt(salt, iv, ciphertext, password)
print("Decrypted message:", decrypted_message)

These are the usages for each of the six functions provided by the encryption modules. You can customize the input values such as the message, shift value, password, IV, and ciphertext according to your requirements.


Contributions Welcome

We welcome contributions from the community to enhance and improve our encryption project. Whether you're interested in adding new features, fixing bugs, improving documentation, or suggesting ideas, your contributions are highly appreciated.

Contact

Author : Rakesh Kanna
E-Mail : rakeshkanna0108@gmail.com
Version : v0.1.2
Repository : https://github.com/rakeshkanna-rk/MonoCipher PyPI : https://pypi.org/project/MonoCipher/

Project Under MIT LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MonoCipher-0.1.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

MonoCipher-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file MonoCipher-0.1.2.tar.gz.

File metadata

  • Download URL: MonoCipher-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for MonoCipher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f6cc1cc94951527a5f9e8d4e8b346493f4c73b46330c87b9d2fb04d5c24a2e2e
MD5 02776d891c14e77d07e409071622483d
BLAKE2b-256 07bdf21aafc3d6b9d0ef03d01a2c4b1adac120465c7ac3c963d1c062bb278d32

See more details on using hashes here.

File details

Details for the file MonoCipher-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: MonoCipher-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for MonoCipher-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 301fa8160360ea3580a357e1a12cdadce849947d59b3d00c0855125da9a7737a
MD5 70bea3b1109c9412bfeffb6aa6b0924a
BLAKE2b-256 11f2501342fe8219cff7cfda5928a5b76751eef501b08d19fea8367b0d2f1000

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page