Skip to main content

A Python package that provides robust encryption and decryption mechanisms, utilizing AES, FERNET, JWE, Hybrid Encryption, AWS KMS, and AWS Secrets Manager.

Project description

🔐 Cryptorix

Cryptorix is a powerful Python package that makes it easy to securely encrypt and decrypt data using:

  • AES, FERNET, JWE, and Hybrid Encryption
  • AWS KMS and Secrets Manager for secure key management

It supports both symmetric (AES) and asymmetric (RSA) encryption, and integrates directly with AWS services to keep your secrets safe.

🧩 Overview

Cryptorix simplifies encryption workflows by offering modular support for:

  • AES and FERNET for secure data encryption
  • JWE for secure token exchange
  • Hybrid Encryption (AES + RSA)
  • AWS KMS for encrypting values
  • AWS Secrets Manager for retrieving and decrypting secrets

🚀 Features

AES

Encrypt and decrypt Python dictionaries with AES encryption.

from Cryptorix.aes import encrypt, decrypt

encrypted = encrypt(data="your_data", aes_key="your_hex_key")
decrypted = decrypt(encrypted_data=encrypted, aes_key="your_hex_key")

Fernet

Encrypt and decrypt Python dictionaries with Fernet encryption.

from Cryptorix.fernet import encrypt, decrypt

encrypted = encrypt(data="your_data", key=b"your_key")
decrypted = decrypt(encrypted_data=encrypted, key=b"your_key")

JWE

Use RSA + AES-GCM to encrypt and decrypt data in JWE format.

from Cryptorix.jwe import encrypt, decrypt

jwe_token = encrypt(data={}, public_key_pem="your_public_key_pem")
original_data = decrypt(encrypted_data=jwe_token, private_key_pem="your_private_key_pem")

Hybrid Encryption

Combines AES for content and RSA for key encryption.

from Cryptorix.hybrid import encrypt, decrypt

result = encrypt(data={}, public_key_pem="your_public_key_pem")
original = decrypt(
    encrypted_data=result["encryptedData"],
    encrypted_key=result["encryptedKey"],
    private_key_pem="your_private_key_pem"
)

AWS KMS

Encrypt and decrypt plain strings using AWS Key Management Service.

from Cryptorix.kms import encrypt, decrypt

enc = encrypt(plaintext="hello", kms_key_id="your_kms_key_id")
dec = decrypt(ciphertext_b64=enc)

AWS Secrets Manager

Fetch secrets securely from AWS.

from Cryptorix.secrets import get_secret_dict, get_secret_value

all_secrets = get_secret_dict(secret_name="your_secret_name")
plain = get_secret_value(secret_name="your_secret_name", key="your_secret_key")

📦 Installation

Install via pip:

pip install Cryptorix

✅ AWS Permissions

Ensure the following IAM permissions:

  • KMS

    • kms:Encrypt
    • kms:Decrypt
  • Secrets Manager

    • secretsmanager:GetSecretValue

🧰 Dependencies


📄 License

MIT License


🤝 Contributing

Contributions are welcome! Feel free to open issues or pull requests.


👤 Author

M Santhosh Kumar 📧 santhoshse7en@gmail.com


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

cryptorix-1.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

cryptorix-1.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file cryptorix-1.1.0.tar.gz.

File metadata

  • Download URL: cryptorix-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cryptorix-1.1.0.tar.gz
Algorithm Hash digest
SHA256 236d6a8a6758409e706a3c2a1482b1c0158b055b09ad5b624a080d66abfe16b1
MD5 43d5717652bf0801e77d1d82453024e1
BLAKE2b-256 cd39fad21f882e59947761345c97e8df68ae22b1937015fc1fb7090519a7fe7e

See more details on using hashes here.

File details

Details for the file cryptorix-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: cryptorix-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cryptorix-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 884595e8c94d4bae579c84dc5db0c8187e096fa05250db88016c1f36d9777621
MD5 8227fdc134d63940eb1de2fd47ad6a2c
BLAKE2b-256 263626f1e0bcd4dab33593981286f8026e262f8b95fc62ce394e959c89e2540b

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