Skip to main content

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

Python Version License Version

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/Alqudimi/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 primitives
  • pynacl - Modern cryptography (NaCl)
  • argon2-cffi - Argon2 password hashing
  • liboqs-python - Post-quantum cryptography
  • flask & flask-cors - API framework
  • pillow - 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

๐Ÿš€ Advanced Features

๐Ÿ“– Reference & Support

๐Ÿ› ๏ธ Production

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:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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:

๐Ÿ“ž Support

For questions, issues, or feature requests:


Made with โค๏ธ by Alqudimi Systems

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

zyracrypt-2.0.2.tar.gz (164.4 kB view details)

Uploaded Source

Built Distribution

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

zyracrypt-2.0.2-py3-none-any.whl (123.1 kB view details)

Uploaded Python 3

File details

Details for the file zyracrypt-2.0.2.tar.gz.

File metadata

  • Download URL: zyracrypt-2.0.2.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

Hashes for zyracrypt-2.0.2.tar.gz
Algorithm Hash digest
SHA256 d83bffc6afec5a885f565e42ba986c6175fd51e13af759c7eba6e239b5fc29ac
MD5 0de4e5a40274c1428c50c502f3aa192b
BLAKE2b-256 abc29778c41e2de77bd9baed243fed3b998c61937f20aa8558459ab126968b83

See more details on using hashes here.

File details

Details for the file zyracrypt-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: zyracrypt-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 123.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for zyracrypt-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1e94d5f9802944df9a17fa801583baba376b64ce06403c32d4b284afc6b45e
MD5 d50600942480251fe85e9cf6af3c29ae
BLAKE2b-256 1f5be84b868e4c158bad1e1cb6a16b5b72a9de72d2ccd0f5432f36de4b2ee8c4

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