=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 Python
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
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
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 details)
File details
Details for the file rsa_encryptor-0.1.tar.gz
.
File metadata
- Download URL: rsa_encryptor-0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83f741f3fdc2d5096c15d8fd744654b8635e0bd8f17860d72339cb89df92d554 |
|
MD5 | ad72b3993909ef9718f515a95bae62cc |
|
BLAKE2b-256 | 94501068d5f4040af74514692e16820713b6098db93b7a81c8a6ad8f8ad8a47b |