DEV Community

Cover image for Introducing Cryptography Suite: A Python Library for the Modern Developer
Psychevus
Psychevus

Posted on

Introducing Cryptography Suite: A Python Library for the Modern Developer

Introducing Cryptography Suite

As developers, we’re often caught between juggling multiple libraries to implement encryption, hashing, key management, and secure protocols in our applications. Wouldn't it be great if we had one unified library to handle all our cryptographic needs without compromising on flexibility or security?

That's exactly what Cryptography Suite aims to solve.

🔍 What is Cryptography Suite?

Cryptography Suite is a comprehensive cryptographic toolkit for Python. Designed to meet the demands of modern developers, it provides a wide range of cryptographic primitives and protocols in a single package. Whether you're encrypting sensitive data, signing messages, or generating one-time passwords (OTPs), this library has you covered.

Unlike some alternatives, Cryptography Suite takes a developer-first approach by providing an intuitive API, solid documentation, and strong security practices.

🎯 Who Is It For?

  • Developers building secure Python applications.
  • Educators looking for a unified library to teach cryptographic concepts.
  • Security Enthusiasts interested in exploring modern cryptographic techniques.
  • Startups & Enterprises needing a library that balances ease-of-use with cutting-edge cryptography.

Whether you’re a seasoned cryptography nerd or someone dipping their toes into secure coding, Cryptography Suite has something to offer.

🌟 Key Features

Here’s what makes Cryptography Suite stand out:

  1. Unified API
    No more juggling multiple libraries! Access encryption, hashing, key management, digital signatures, password-based key exchange (PAKE), secret sharing, and OTPs from a single library.

  2. Modern Cryptographic Standards

    • Symmetric Encryption: AES-GCM, ChaCha20-Poly1305.
    • Asymmetric Encryption: RSA, Ed25519, ECDSA.
    • Hashing: SHA-256, SHA-512, BLAKE2b.
    • Secret Sharing: Shamir’s Secret Sharing.
    • Password Authentication: SPAKE2 (PAKE).
  3. Developer-Friendly Design
    A simple, intuitive API that saves time. No cryptography degree required to get started!

  4. Cross-Platform Compatibility
    Works seamlessly on Linux, macOS, and Windows.

  5. Extensible & Customizable
    Need a specific encryption mode or key size? Extend and tweak the library to suit your needs.

  6. Rigorous Testing
    Achieves 98% test coverage, so you can trust it in your workflows.

🚀 Getting Started

Installation is as easy as running:

pip install cryptography-suite
Enter fullscreen mode Exit fullscreen mode

Or, clone the repository for custom development:

git clone https://github.com/Psychevus/cryptography-suite.git
cd cryptography-suite
pip install .
Enter fullscreen mode Exit fullscreen mode

💡 Example Use Cases

1. Encrypt Data with AES-GCM

from cryptography_suite.encryption import aes_encrypt, aes_decrypt

message = "Confidential Data"
password = "securepassword123"

# Encrypt the message
encrypted = aes_encrypt(message, password)
print("Encrypted:", encrypted)

# Decrypt the message
decrypted = aes_decrypt(encrypted, password)
print("Decrypted:", decrypted)
Enter fullscreen mode Exit fullscreen mode

2. Generate RSA Keys and Encrypt Data

from cryptography_suite.asymmetric import generate_rsa_keypair, rsa_encrypt, rsa_decrypt

private_key, public_key = generate_rsa_keypair()

data = b"Sensitive Data"

# Encrypt the data
encrypted_data = rsa_encrypt(data, public_key)

# Decrypt the data
decrypted_data = rsa_decrypt(encrypted_data, private_key)

print("Decrypted Data:", decrypted_data)
Enter fullscreen mode Exit fullscreen mode

3. Split and Recover Secrets with Shamir's Secret Sharing

from cryptography_suite.secret_sharing import create_shares, reconstruct_secret

secret = 123456789
shares = create_shares(secret, threshold=3, num_shares=5)

# Reconstruct the secret using 3 shares
recovered_secret = reconstruct_secret(shares[:3])
print("Recovered Secret:", recovered_secret)
Enter fullscreen mode Exit fullscreen mode

🤔 Why Not Just Use Cryptography or PyCryptodome?

Great question! While both libraries are fantastic, Cryptography Suite adds several unique benefits:

  • Unified API: Instead of importing multiple libraries and juggling inconsistent APIs, Cryptography Suite provides everything under one roof.
  • Better Defaults: The library bakes in security best practices by default—no need to worry about accidentally misusing cryptographic primitives.
  • Customizability: Need custom key sizes, algorithms, or encryption modes? Cryptography Suite is designed for easy extensibility.

🔒 Security Disclaimer

Security is hard. While Cryptography Suite implements widely accepted cryptographic standards, it is crucial to have third-party audits before using it in high-stakes production environments. Treat this library as a powerful tool but ensure your use cases align with best practices in security engineering.


🛠 Contribute or Learn More

The full source code is available on GitHub. Contributions are welcome—whether it’s feedback, feature requests, or pull requests. Let’s build something secure together!

👉 GitHub Repository


📬 What Do You Think?

I’d love to hear your thoughts! Whether it’s a feature you’d like to see, a discussion about cryptographic challenges, or general feedback, feel free to leave a comment or reach out.

TL;DR:
Cryptography Suite is an all-in-one Python library for cryptographic tasks, designed to save you time, simplify your workflows, and empower your projects. Give it a try and let me know what you think!

Top comments (0)