Hybrid Encryption & Decryption with Minimal Efforts.
Project description
encrypt_data
Overview
encrypt_data is a Python package that simplifies the process of encrypting and decrypting data using Hybrid Encryption (a combination of asymmetric and symmetric encryption). This package makes it easy to securely transfer sensitive data over networks while maintaining integrity and confidentiality.
Features
Simplified Encryption & Decryption: Encrypt and decrypt data easily with minimal steps.
Hybrid Encryption: Utilizes both asymmetric (RSA) and symmetric (AES) encryption for better security.
Secure Data Transfer: Enables secure transmission of bulk data over networks.
Integrity Check: Uses hashing (SHA-512) to ensure data integrity during transmission.
Easy Integration: Can be seamlessly integrated into any Python application.
Installation
To install the package, use:
pip install encrypt_data
Package Structure
encrypt_data/ |__ encrypt_data/ | |__ init.py | |__ main.py |__ setup.py |__ README.md
Usage
Encryption
from encrypt_data import Encrypt
public_key = "-----BEGIN RSA PUBLIC KEY----------END RSA PUBLIC KEY-----\n" encrypt = Encrypt(public_key) encryption_data = {'payload': {"name": "john"}} data_encrypted = encrypt.encrypt_data(data_to_be_encrypted=encryption_data)
Decryption
from encrypt_data import Decrypt
private_key = """-----BEGIN RSA PRIVATE KEY----------END RSA PRIVATE KEY-----""" decrypt = Decrypt(private_key=private_key, data_to_be_decrypted=data_encrypted['encrypted_data']) data_decrypted = decrypt.decrypt_data()
How It Works
Key Generation: The package uses an RSA public-private key pair for encryption and decryption.
Symmetric Key Encryption: A symmetric key (AES) is generated and encrypted using RSA public key.
Data Encryption: Data is encrypted using the symmetric key.
Data Transmission: The encrypted symmetric key and encrypted data are sent over the network.
Decryption:
The symmetric key is decrypted using the private key.
The data is decrypted using the decrypted symmetric key.
The hash is verified to check data integrity.
Security Measures
Uses RSA for asymmetric encryption and Fernet (AES-based) encryption for symmetric encryption.
Implements SHA-512 hashing to detect tampering.
Encrypts both the symmetric key and the actual data for better security.
Ensures data integrity through hash verification after decryption.
License
This package is released under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file encrypt_data-0.3.tar.gz.
File metadata
- Download URL: encrypt_data-0.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4ecc88f908622a793e3469335c324483bc665374e483281b8a79e9241e56252
|
|
| MD5 |
360a32590350b69836a80f9e9a5af1aa
|
|
| BLAKE2b-256 |
8ddbfd0a67ad935fcd187655dc4d2883899af36f05811bf9c35ffe59b66e84b8
|
File details
Details for the file encrypt_data-0.3-py3-none-any.whl.
File metadata
- Download URL: encrypt_data-0.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2702c3c8a41f76d36dc249021d4987c19803b211118cf96c1e813e680525f291
|
|
| MD5 |
c5e7dcc22f09d02f47d7dd4f66299e63
|
|
| BLAKE2b-256 |
5dc5a9539f8dd3235c05bcd66a3476a9f4d28c1ab20c2debf8207e75402712e0
|