Skip to main content

ZyraCrypt 🔒

Enterprise-Grade Cryptography Made Simple — for everyone: beginners, developers, and AI models.

PyPI version PyPI downloads CI Python License: MIT Code style: black

ZyraCrypt is a comprehensive, production-ready cryptographic library for Python. It wraps industrial-strength primitives (AES-256-GCM, ChaCha20-Poly1305, RSA, ECDSA, Argon2, scrypt, Kyber/Dilithium) into three friendly layers:

Layer For whom One-liner idea
🧩 SimpleCrypt Everyone (no crypto knowledge needed) One password → encrypt text, bytes, or files
🧰 EncryptionFramework Developers (full control) Key-based AES-GCM / ChaCha20 / PQC hybrid encryption
⌨️ zyracrypt CLI Terminal users & scripts zyracrypt encrypt file.pdf -p PASSWORD

🇸🇦 بالعربية؟ اقرأ README_AR.md — الدليل الشامل باللغة العربية.

🤖 For AI models / agents: this README, docs/00-index.md, AGENTS.md and docs/ROADMAP.md are kept structured, explicit and complete so that any model (ChatGPT, DeepSeek, Copilot, ...) can parse and use ZyraCrypt correctly without guessing.


Table of contents

  1. Why ZyraCrypt?
  2. Installation
  3. Quick start — the easy way (SimpleCrypt)
  4. Quick start — the classic way (EncryptionFramework)
  5. Command-line interface
  6. Feature matrix
  7. Complete documentation
  8. Examples
  9. Security
  10. FAQ
  11. Contributing
  12. Support
  13. Author & license

🎯 Why ZyraCrypt?

Most crypto libraries force you to choose between easy but weak or strong but complicated. ZyraCrypt refuses that trade-off:

  • ✅ Safe by default. Random salt + fresh nonce for every message, AES-GCM authenticated encryption, memory-hard key derivation. There is no code path that silently reuses keys or IVs.
  • ✅ Beginner-first API. SimpleCrypt("password").encrypt_text("hi") — that is genuinely all it takes. No modes, no padding, no IV handling.
  • ✅ Expert-grade depth. Post-quantum hybrid encryption, threshold signatures, MPC, secure enclaves, steganography, blockchain cryptography.
  • ✅ A real CLI. Encrypt files from the terminal or from shell scripts — no Python needed.
  • ✅ Verified quality. Every release passes the automated test suite on Python 3.10–3.13 via GitHub Actions before it reaches PyPI.
  • ✅ Honest documentation. 18 guides covering 100% of the surface, from "what is encryption?" to threshold multisig internals.

📦 Installation

# The standard way — from PyPI
pip install zyracrypt

# Optional extras
pip install "zyracrypt[pqc]"     # post-quantum crypto (Kyber, Dilithium)
pip install "zyracrypt[api]"     # group end-to-end encryption web API
pip install "zyracrypt[all]"     # everything
pip install "zyracrypt[dev]"    # development tools (pytest, black, ...)
From source / development install
git clone https://github.com/Alqudimi/ZyraCrypt.git
cd ZyraCrypt
pip install -e .            # editable install
pip install -e ".[dev]"     # with development tools

Requirements: Python 3.10+ (3.10, 3.11, 3.12, 3.13 supported and CI-tested). Core dependencies (cryptography, pynacl, argon2-cffi, pillow) are installed automatically.

🚀 Quick start — the easy way (SimpleCrypt)

One password, three calls. The container format is self-describing and carries its own random salt and nonce for every message.

from zyracrypt import SimpleCrypt

crypt = SimpleCrypt("my-very-strong-password")

# 1) Text (armored as base64 — safe to store anywhere)
blob = crypt.encrypt_text("Top secret message")
assert crypt.decrypt_text(blob) == "Top secret message"

# 2) Raw bytes
data = crypt.encrypt_bytes(b"\x00\x01\x02")
assert crypt.decrypt_bytes(data) == b"\x00\x01\x02"

# 3) Files (original is left untouched; result gets a .zc suffix)
crypt.encrypt_file("report.pdf")       # -> report.pdf.zc
crypt.decrypt_file("report.pdf.zc")    # -> report.pdf

Wrong password? Tampered data? You get a clear exception — never silent garbage:

from zyracrypt.simple import WrongPasswordError, CorruptedDataError

Full guide: docs/17-simplecrypt-guide.md

🧰 Quick start — the classic way (EncryptionFramework)

You control the key, the algorithm, and the associated data:

from zyracrypt import EncryptionFramework

framework = EncryptionFramework()
key = b"your-32-byte-key-here-for-aes256"   # 32 bytes = AES-256
data = b"Sensitive information"

algo, iv, ciphertext, tag = framework.encrypt(data, key, "AES-GCM")
recovered = framework.decrypt(algo, key, iv, ciphertext, tag)
assert recovered == data

Let ZyraCrypt choose the algorithm for you ("auto"), or force ChaCha20:

algo, nonce, ct, _ = framework.encrypt(data, key, "ChaCha20")

Keys from passwords (Argon2id / scrypt / PBKDF2), secure storage, rotation and envelope encryption: docs/03-key-management.md

⌨️ Command-line interface

The zyracrypt command is installed automatically with the package:

$ zyracrypt encrypt secret.pdf -p "my password"      # -> secret.pdf.zc
Encrypted -> secret.pdf.zc

$ zyracrypt decrypt secret.pdf.zc -p "my password"    # -> secret.pdf
Decrypted -> secret.pdf

$ zyracrypt encrypt-text "hello" -p pw                # base64 blob on stdout
$ zyracrypt decrypt-text "<blob>" -p pw                # plaintext on stdout

$ zyracrypt keygen                                    # 256-bit hex key
$ zyracrypt generate-password --length 32             # strong random password
$ zyracrypt hash file.bin --algo sha256               # file digest
$ zyracrypt info                                      # version + capabilities

If you omit -p, the CLI prompts for the password with hidden input. Full guide (all 8 commands, exit codes, examples): docs/16-cli-guide.md

📊 Feature matrix

Area What you get Where
Core encryption AES-256-GCM, AES-192/128, ChaCha20-Poly1305, RSA-2048/4096, ECDSA (P-256/384/521), ECDH core_cryptography
Post-quantum (PQC) Kyber KEM, Dilithium signatures, hybrid classical+PQC (HKDF-bound) post_quantum_cryptography, advanced_features
Key management Generation, Argon2id/scrypt/PBKDF2 derivation, encrypted key store, rotation, envelope encryption, KMS provider, HSM hooks key_management
Threshold & MPC Shamir secret sharing, threshold ECDSA/multisig, secure multi-party computation advanced_features
Data protection Secure memory zeroing, compression, obfuscation, data type manager data_protection
Specialized security File encryption, secure sessions, secure deletion, steganography (images) specialized_security
Advanced research Homomorphic encryption, IBE, group E2E, white-box crypto, side-channel protection, tamper-resistant structures, audit log advanced_features
Everyone API SimpleCrypt (password → encrypted text/bytes/files) zyracrypt.simple
CLI zyracrypt command: encrypt/decrypt/keygen/hash/info zyracrypt.cli

📚 Complete documentation

The docs/ folder is the full manual — 18 guides written to be readable by humans and parseable by AI models. Start at the index: docs/00-index.md

# Guide What it covers
00 Index Map of all documentation
01 Getting started Install, first encryption, troubleshooting install issues
02 Basic encryption SimpleCrypt + framework basics, keys, IVs, tags
03 Key management Generate, derive, store, rotate, envelope encryption, KMS
04 Advanced features Threshold, MPC, enclaves, homomorphic
05 Post-quantum crypto Why PQC, Kyber/Dilithium, hybrid mode
06 Examples Copy-paste recipes for common tasks
07 API reference Every class and method
08 Security best practices Passwords, key hygiene, what NOT to do
09 Data protection Memory handling, compression, obfuscation
10 Specialized security Sessions, deletion, steganography
11 Blockchain crypto Hashing, signatures, addresses
12 Troubleshooting Every common error and its fix
13 FAQ Frequently asked questions
14 Deployment guide Servers, containers, CI/CD
15 Performance Benchmarks and tuning
16 CLI guide The zyracrypt command, all subcommands
17 SimpleCrypt guide The easy API in depth (beginner-friendly)
18 Code analysis Architecture deep-dive

Extras: CHANGELOG.md · docs/ROADMAP.md · AGENTS.md (for AI coding agents) · README_AR.md (العربية)

💡 Examples

Runnable, commented scripts live in examples/:

python examples/quickstart.py          # SimpleCrypt in 20 lines
python examples/file_encryption.py     # encrypt/decrypt any file
python examples/key_management_demo.py # keys, derivation, storage
bash   examples/cli_demo.sh            # full CLI walkthrough

🛡️ Security

  • ZyraCrypt uses audited primitives from the cryptography and pynacl projects — it never rolls its own low-level ciphers.
  • All encryption is authenticated (GCM/Poly1305): tampering is detected, never silently decrypted.
  • Please read SECURITY.md before handling real secrets, and report vulnerabilities only through the private GitHub channel described there.
  • Never hardcode passwords in source code; use environment variables or a secrets manager (see docs/08-security-best-practices.md).

❓ FAQ

Is ZyraCrypt safe for production / real secrets?

The cryptographic primitives come from the industry-standard cryptography library. ZyraCrypt's job is to combine them correctly (fresh salt+nonce per message, authenticated modes, memory-hard KDFs). For highly sensitive data always follow docs/08-security-best-practices.md and keep the library updated. Full FAQ: docs/13-faq.md.

Which Python versions are supported?

Python 3.10, 3.11, 3.12 and 3.13 — all tested in CI on every push.

What is the .zc file produced by encrypt_file?

A versioned container: magic ZC1 + version + 16-byte salt + 12-byte nonce + AES-256-GCM ciphertext (tag included). It is fully documented in docs/17-simplecrypt-guide.md.

Do I need liboqs installed?

Only for the optional post-quantum features: pip install "zyracrypt[pqc]". Everything else works without it, and tests auto-skip.

🤝 Contributing

Contributions are welcome — bug reports, fixes, docs, new features. Read CONTRIBUTING.md (setup, style, tests, PR checklist) and open a pull request. Every PR must keep the test suite green.

💬 Support

👤 Author & license

Abdulaziz Mohammed Alqudimi — GitHub: @Alqudimi — abodx1234freey@gmail.com

Released under the MIT License — see LICENSE. Copyright © 2025-2026 Abdulaziz Mohammed Alqudimi.

Metadata

Release files for zyracrypt 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zyracrypt 2.1.0
File Size Uploaded Provenance Actions
zyracrypt-2.1.0.tar.gz 217.1 kB Without provenance Details for zyracrypt-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zyracrypt 2.1.0
File Interpreter ABI Platform Actions
zyracrypt-2.1.0-py3-none-any.whl Python 3 none any Details for zyracrypt-2.1.0-py3-none-any.whl

Total release size: 351.4 kB

Release files / zyracrypt-2.1.0.tar.gz

Download URL zyracrypt-2.1.0.tar.gz
Size 217.1 kB
Tags Source
SHA-256 checksum
How to use checksums
82bfcf95dfb4ac5764410efeaf50ec9616b64e4d28e3212ec978c2dba813644f
BLAKE2b-256 checksum
How to use checksums
e4a7b324db2b23f61f306d0d0f9c793b31dd6c5c6ffc4ba6ee75fdd2460cf624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / zyracrypt-2.1.0-py3-none-any.whl

Download URL zyracrypt-2.1.0-py3-none-any.whl
Size 134.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd75a5fd0416979146ad714f790e6e34eb17953b2d1de39e86785f75499de618
BLAKE2b-256 checksum
How to use checksums
447d8bd2f3209679da32596f32aab28ae219446092e00ed9c5faca97c11f47d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for zyracrypt 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page