Skip to main content

=A minimal implemetation of asymetric encryption operations using RSA

Project description

📖 RSA Encryptor

RSA Encryptor A minimal implemetation of asymetric encryption operations using RSA

Functionalities include:

  • File encryption and decryption
  • File signature and verification

Setup

Prerequisites

In order to run this project you need to:

Install

Install the package via pip

pip install rsa_encryptor

Usage

Encryption

from rsa_encryptor import Encryption

# Create an object
encryptor = Encryption()

# Generate keys or load recivers public key using encryptor.load_keys(public_key_path='path_to_public_key.pem')
encryptor.generate_key_pair()

# You can export keys as .pem
encryptor.export_keys()

# Encrypt a file
encryptor.encrypt_file('path_to_file')

Decryption

from rsa_encryptor import Encryption

# Create an object
encryptor = Encryption()

# Load your private key
encryptor.load_keys(private_key_path='path_to_private_key.pem')

# Decrypt an encrypted file
encryptor.decrypt_file('path_to_encrypted_file')

Signature

from rsa_encryptor import Signature

# Create an object
signer = Signature()

# Generate keys or load your private key using encryptor.load_keys(private_key_path='path_to_private_key.pem')
encryptor.generate_key_pair()

# Sign a file
signer.sign('path_to_file')

Signature Verfication

from rsa_encryptor import Signature

# Create an object
signer = Signature()

# Generate keys or load your private key using encryptor.load_keys(private_key_path='path_to_private_key.pem')

# Load senders public key
encryptor.load_keys(public_key_path='path_to_public_key.pem')

# Verify the signature
signer.verify('path_to_file','path_to_signature')

👆

Authors

Bahir Hakimi

  • LinkedIn
  • Gmail
  • Twitter

👆

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

👆

Show your support

If you like this project leave a start for it.

👆

Acknowledgments

The package functionalities are based on rsa by sybrenstuvel.

👆

License

This project is MIT licensed.

👆

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

rsa_encryptor-0.1.tar.gz (5.5 kB view hashes)

Uploaded Source

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