Enterprise-grade cryptographic library providing advanced encryption, post-quantum cryptography, key management, threshold signatures, and secure enclaves
Project description
ZyraCrypt ๐
Enterprise-Grade Cryptographic Library for Python
ZyraCrypt is a comprehensive cryptographic library providing enterprise-grade security features including advanced encryption, post-quantum cryptography, key management, threshold signatures, secure enclaves, and more.
โจ Features
๐ Core Encryption
- Symmetric Encryption: AES-256-GCM, ChaCha20-Poly1305
- Asymmetric Encryption: RSA-2048/4096, ECDSA (P-256, P-384, P-521), ECDH
- Post-Quantum Cryptography: Kyber (KEM), Dilithium (Signatures)
- Hybrid Encryption: Classical + Post-Quantum combined for future-proof security
๐ Key Management
- Advanced key generation with multiple KDFs (Argon2id, Scrypt, PBKDF2)
- Secure key storage with encryption at rest
- Key rotation and versioning
- Envelope encryption with KMS integration
- Hardware Security Module (HSM) support
- Threshold key management
๐ก๏ธ Advanced Security
- Threshold Signatures: Shamir secret sharing with configurable thresholds
- Multi-Signature Schemes: Collaborative signing protocols
- Multi-Party Computation (MPC): Secure distributed computations
- Secure Enclaves: Software and hardware-backed secure execution
- Side-Channel Resistance: Constant-time operations and memory protection
- Algorithm Agility: Easy migration between cryptographic algorithms
๐ Password Security
- Modern password hashing (Argon2id, Scrypt, PBKDF2)
- Password strength validation
- Secure password generation
- Breach detection ready
๐ฏ Specialized Features
- Plausible deniability layers
- Steganography for data hiding
- Secure memory zeroing
- File encryption utilities
- Secure session management
- Cryptographic audit logging
- Group end-to-end encryption
- Identity-based encryption (IBE)
๐ฆ Installation
Prerequisites
- Python 3.10 or higher
- pip package manager
Install from source
# Clone the repository
git clone https://github.com/yourusername/zyracrypt.git
cd zyracrypt
# Install in development mode
pip install -e .
# Or install with dev dependencies
pip install -e ".[dev]"
Dependencies
ZyraCrypt automatically installs the following dependencies:
cryptography- Core cryptographic primitivespynacl- Modern cryptography (NaCl)argon2-cffi- Argon2 password hashingliboqs-python- Post-quantum cryptographyflask&flask-cors- API frameworkpillow- Image processing for steganography
๐ Quick Start
Basic Encryption
from core_cryptography.encryption_framework import EncryptionFramework
# Initialize the framework
framework = EncryptionFramework()
# Your data and key
key = b"your-32-byte-key-here-for-aes256" # 32 bytes for AES-256
data = b"Sensitive information to encrypt"
# Encrypt
algo, iv, ciphertext, tag = framework.encrypt(data, key, "AES-GCM")
print(f"Encrypted with {algo}")
# Decrypt
decrypted = framework.decrypt(algo, key, iv, ciphertext, tag)
print(f"Decrypted: {decrypted.decode()}")
Key Management
from key_management.key_manager import KeyManager
# Initialize key manager
key_manager = KeyManager()
# Generate a secure key from password
password = "MySecurePassword123!"
key_data = key_manager.key_generator.derive_key_from_password(
password,
algorithm="argon2"
)
# Store the key securely
key_manager.key_store.store_key("my_key_id", key_data)
# Retrieve when needed
retrieved_key = key_manager.key_store.retrieve_key("my_key_id")
Threshold Signatures
from advanced_features.threshold_multisig_enhanced import ThresholdECDSA
# Create threshold ECDSA instance
threshold_ecdsa = ThresholdECDSA()
# Setup: 3-of-5 threshold signature scheme
participants = ["alice", "bob", "charlie", "dave", "eve"]
keypair = threshold_ecdsa.generate_threshold_keypair(
threshold=3,
total_participants=5,
participants=participants
)
# Sign a message (need 3 participants)
message = b"Important transaction data"
partial_signatures = []
for i, participant in enumerate(participants[:3]):
partial_sig = threshold_ecdsa.create_partial_signature(
keypair, i + 1, message, participant
)
partial_signatures.append(partial_sig)
# Combine signatures
final_signature = threshold_ecdsa.combine_partial_signatures(
keypair, partial_signatures, message
)
# Verify
is_valid = threshold_ecdsa.verify_threshold_signature(
keypair, final_signature, message
)
print(f"Signature valid: {is_valid}")
Envelope Encryption with KMS
from key_management.envelope_encryption_kms import (
EnvelopeEncryptionManager, KeyStorageLevel
)
# Initialize manager
manager = EnvelopeEncryptionManager()
# Generate data encryption key
key_id, wrapped_key = manager.generate_data_encryption_key(
purpose="database_encryption",
algorithm="AES-256-GCM",
security_level=KeyStorageLevel.HIGH_SECURITY
)
# Encrypt data with wrapped key
sensitive_data = b"Confidential database records"
encrypted = manager.encrypt_with_wrapped_key(wrapped_key, sensitive_data)
# Decrypt
decrypted = manager.decrypt_with_wrapped_key(wrapped_key, encrypted)
๐ Documentation
๐ Comprehensive Arabic Documentation
Complete documentation in Arabic (ุงูุนุฑุจูุฉ) covering every aspect of ZyraCrypt:
๐ Start Here: Arabic Documentation Guide โ
The Arabic documentation includes 16 comprehensive guides:
๐ฏ Quick Start
- 00. Index & Navigation - Complete documentation index
- 01. Getting Started - Installation and setup
- 02. Basic Encryption - AES, ChaCha20, RSA, ECDSA
- 03. Key Management - Secure key handling
๐ Advanced Features
- 04. Advanced Features - Threshold signatures, MPC, side-channel protection
- 05. Post-Quantum Crypto - Kyber, Dilithium, hybrid encryption
- 06. Practical Examples - Complete real-world implementations
- 09. Data Protection - Compression, obfuscation, memory handling
- 10. Specialized Security - File encryption, steganography, secure deletion
- 11. Blockchain Crypto - Block hashing, PoW, transactions
๐ Reference & Support
- 07. API Reference - Complete API documentation
- 08. Security Best Practices - Security guidelines
- 12. Troubleshooting - Common issues and solutions
- 13. FAQ - Frequently asked questions
๐ ๏ธ Production
- 14. Deployment Guide - AWS, Docker, Kubernetes
- 15. Performance Optimization - Speed and efficiency tips
Coverage: 100+ practical examples | 200+ pages | Every feature documented
๐งช Testing
Run the comprehensive test suite:
python test_advanced_features.py
Test coverage includes:
- โ Envelope Encryption & KMS
- โ Enhanced KDF & Password schemes
- โ Algorithm Agility & Versioning
- โ Threshold Signatures & Multisig
- โ MPC & Secure Enclaves
- โ Side-Channel Resistance
- โ ๏ธ Hybrid Post-Quantum Cryptography (optional)
Current Test Results: 6/7 tests passing (85.7%)
๐๏ธ Project Structure
zyracrypt/
โโโ core_cryptography/ # Core encryption algorithms
โ โโโ encryption_framework.py
โ โโโ symmetric_encryption.py
โ โโโ asymmetric_encryption.py
โ โโโ algorithm_agility_versioning.py
โโโ key_management/ # Key generation and management
โ โโโ key_manager.py
โ โโโ key_generator.py
โ โโโ envelope_encryption_kms.py
โ โโโ enhanced_kdf_password.py
โโโ advanced_features/ # Advanced cryptographic features
โ โโโ threshold_multisig_enhanced.py
โ โโโ secure_mpc_enclaves.py
โ โโโ hybrid_pqc_enhanced.py
โ โโโ side_channel_protection.py
โโโ data_protection/ # Data protection utilities
โ โโโ data_protection_manager.py
โ โโโ compression_unit.py
โ โโโ secure_memory_handling.py
โโโ specialized_security/ # Specialized security features
โ โโโ file_encryption_manager.py
โ โโโ steganography_unit.py
โ โโโ secure_session_manager.py
โโโ post_quantum_cryptography/ # Post-quantum algorithms
โโโ post_quantum_cryptography_unit.py
๐ Security Features
Side-Channel Protection
- Constant-time comparisons to prevent timing attacks
- Secure memory zeroing to prevent data leakage
- Protected random number generation
Algorithm Agility
- Easy migration between cryptographic algorithms
- Version tracking for encrypted data
- Automatic algorithm deprecation detection
Audit Logging
- Comprehensive cryptographic operation logging
- Tamper-evident audit trails
- Compliance-ready logging formats
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
โ ๏ธ Security Notice
This library implements cryptographic primitives and should be used with care:
- Always use secure random keys of appropriate length
- Never reuse nonces/IVs with the same key
- Store keys securely and rotate them regularly
- Keep dependencies up to date
- Review the security best practices documentation
๐ Acknowledgments
Built with:
- cryptography - Python cryptographic library
- PyNaCl - Python binding to libsodium
- liboqs-python - Post-quantum cryptography
๐ Support
For questions, issues, or feature requests:
- Open an issue on GitHub
- Check the documentation
- Review the examples
Made with โค๏ธ by Alqudimi Systems
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 zyracrypt-2.0.1.tar.gz.
File metadata
- Download URL: zyracrypt-2.0.1.tar.gz
- Upload date:
- Size: 164.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aac7d14dafc6d63a0c24c9390efc3b9bab53344e1d7f4dea3973d92e89f23aac
|
|
| MD5 |
735e2b0d8b9f05809bfa81f8da89aae4
|
|
| BLAKE2b-256 |
e003641540328ecbea643e1dd6e61aaa65b7eb0ad3013bebce60dbf706b6e1a5
|
File details
Details for the file zyracrypt-2.0.1-py3-none-any.whl.
File metadata
- Download URL: zyracrypt-2.0.1-py3-none-any.whl
- Upload date:
- Size: 122.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c65f6326503852487da68c5bdb6814b0d873a50959006217cfe5a6924f347595
|
|
| MD5 |
2ace987fffa860f2a34f194528191e0d
|
|
| BLAKE2b-256 |
964b9721a24ac079dafe57894499219c760ab994607af9229a7294e9be3a892a
|