Skip to main content

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


Download files

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

Source Distribution

encrypt_data-0.4.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

encrypt_data-0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file encrypt_data-0.4.tar.gz.

File metadata

  • Download URL: encrypt_data-0.4.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

Hashes for encrypt_data-0.4.tar.gz
Algorithm Hash digest
SHA256 fa01a74014effc325312c16c9d23dd25429ef1d12206def6c66665b00cca7747
MD5 05c6dd50c2a730d1a0a7df86a5bc54e8
BLAKE2b-256 76916cf6ba9e64fc168b8277907b760ee4fc1727fd30648d29cee7f575b3fb0e

See more details on using hashes here.

File details

Details for the file encrypt_data-0.4-py3-none-any.whl.

File metadata

  • Download URL: encrypt_data-0.4-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

Hashes for encrypt_data-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 403c6fc3cf4424af04964e2b98c2bc4f10f2742f7c13ec4586eca0e81d71f7bc
MD5 2037f68cd15b6e39d39728583f131299
BLAKE2b-256 6f8f464229b6f8db1c657be076cdd7b07bb1f82e98c6c4c3a7ef5bc347fb67db

See more details on using hashes here.

Supported by

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