zyracrypt 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zyracrypt-2.0.0/LICENSE +21 -0
- zyracrypt-2.0.0/MANIFEST.in +29 -0
- zyracrypt-2.0.0/PKG-INFO +398 -0
- zyracrypt-2.0.0/README.md +331 -0
- zyracrypt-2.0.0/advanced_features/__init__.py +35 -0
- zyracrypt-2.0.0/advanced_features/blockchain_cryptography_functions.py +33 -0
- zyracrypt-2.0.0/advanced_features/cryptographic_audit_log.py +39 -0
- zyracrypt-2.0.0/advanced_features/group_e2e_api.py +313 -0
- zyracrypt-2.0.0/advanced_features/group_e2e_encryption.py +331 -0
- zyracrypt-2.0.0/advanced_features/homomorphic_encryption.py +518 -0
- zyracrypt-2.0.0/advanced_features/hybrid_pqc_engine.py +0 -0
- zyracrypt-2.0.0/advanced_features/hybrid_pqc_enhanced.py +486 -0
- zyracrypt-2.0.0/advanced_features/ibe_cryptography.py +337 -0
- zyracrypt-2.0.0/advanced_features/memory_encryption_unit.py +29 -0
- zyracrypt-2.0.0/advanced_features/pqc_cryptography.py +251 -0
- zyracrypt-2.0.0/advanced_features/secure_enclave_mpc.py +520 -0
- zyracrypt-2.0.0/advanced_features/secure_messaging_protocol.py +53 -0
- zyracrypt-2.0.0/advanced_features/secure_mpc_enclaves.py +634 -0
- zyracrypt-2.0.0/advanced_features/secure_multi_party_computation.py +604 -0
- zyracrypt-2.0.0/advanced_features/security_hardening.py +476 -0
- zyracrypt-2.0.0/advanced_features/side_channel_protection.py +463 -0
- zyracrypt-2.0.0/advanced_features/tamper_resistant_data_structures.py +77 -0
- zyracrypt-2.0.0/advanced_features/threshold_multisig.py +682 -0
- zyracrypt-2.0.0/advanced_features/threshold_multisig_enhanced.py +605 -0
- zyracrypt-2.0.0/advanced_features/white_box_cryptography.py +615 -0
- zyracrypt-2.0.0/core_cryptography/__init__.py +24 -0
- zyracrypt-2.0.0/core_cryptography/algorithm_agility_versioning.py +535 -0
- zyracrypt-2.0.0/core_cryptography/algorithm_manager.py +37 -0
- zyracrypt-2.0.0/core_cryptography/asymmetric_encryption.py +65 -0
- zyracrypt-2.0.0/core_cryptography/crypto_suite_registry.py +320 -0
- zyracrypt-2.0.0/core_cryptography/encryption_framework.py +109 -0
- zyracrypt-2.0.0/core_cryptography/enhanced_algorithm_manager.py +381 -0
- zyracrypt-2.0.0/core_cryptography/plausible_deniability.py +65 -0
- zyracrypt-2.0.0/core_cryptography/symmetric_encryption.py +59 -0
- zyracrypt-2.0.0/data_protection/__init__.py +22 -0
- zyracrypt-2.0.0/data_protection/compression_unit.py +17 -0
- zyracrypt-2.0.0/data_protection/data_obfuscation_unit.py +17 -0
- zyracrypt-2.0.0/data_protection/data_protection_manager.py +50 -0
- zyracrypt-2.0.0/data_protection/data_type_manager.py +74 -0
- zyracrypt-2.0.0/data_protection/secure_memory_handling.py +15 -0
- zyracrypt-2.0.0/docs/00-index.md +297 -0
- zyracrypt-2.0.0/docs/01-getting-started.md +138 -0
- zyracrypt-2.0.0/docs/02-basic-encryption.md +315 -0
- zyracrypt-2.0.0/docs/03-key-management.md +434 -0
- zyracrypt-2.0.0/docs/04-advanced-features.md +471 -0
- zyracrypt-2.0.0/docs/05-post-quantum.md +412 -0
- zyracrypt-2.0.0/docs/06-examples.md +689 -0
- zyracrypt-2.0.0/docs/07-api-reference.md +585 -0
- zyracrypt-2.0.0/docs/08-security-best-practices.md +445 -0
- zyracrypt-2.0.0/docs/09-data-protection.md +519 -0
- zyracrypt-2.0.0/docs/10-specialized-security.md +614 -0
- zyracrypt-2.0.0/docs/11-blockchain-crypto.md +524 -0
- zyracrypt-2.0.0/docs/12-troubleshooting.md +546 -0
- zyracrypt-2.0.0/docs/13-faq.md +464 -0
- zyracrypt-2.0.0/docs/14-deployment-guide.md +637 -0
- zyracrypt-2.0.0/docs/15-performance-optimization.md +574 -0
- zyracrypt-2.0.0/docs/README_AR.md +290 -0
- zyracrypt-2.0.0/key_management/__init__.py +23 -0
- zyracrypt-2.0.0/key_management/enhanced_kdf.py +555 -0
- zyracrypt-2.0.0/key_management/enhanced_kdf_password.py +626 -0
- zyracrypt-2.0.0/key_management/enhanced_key_manager.py +361 -0
- zyracrypt-2.0.0/key_management/envelope_encryption_kms.py +547 -0
- zyracrypt-2.0.0/key_management/key_exchange.py +57 -0
- zyracrypt-2.0.0/key_management/key_generator.py +61 -0
- zyracrypt-2.0.0/key_management/key_manager.py +74 -0
- zyracrypt-2.0.0/key_management/kms_provider.py +618 -0
- zyracrypt-2.0.0/key_management/secure_key_store.py +59 -0
- zyracrypt-2.0.0/post_quantum_cryptography/__init__.py +24 -0
- zyracrypt-2.0.0/post_quantum_cryptography/post_quantum_cryptography_unit.py +34 -0
- zyracrypt-2.0.0/pyproject.toml +158 -0
- zyracrypt-2.0.0/requirements.txt +14 -0
- zyracrypt-2.0.0/setup.cfg +91 -0
- zyracrypt-2.0.0/setup.py +15 -0
- zyracrypt-2.0.0/specialized_security/__init__.py +22 -0
- zyracrypt-2.0.0/specialized_security/file_encryption_manager.py +44 -0
- zyracrypt-2.0.0/specialized_security/secure_deletion_unit.py +45 -0
- zyracrypt-2.0.0/specialized_security/secure_session_manager.py +52 -0
- zyracrypt-2.0.0/specialized_security/steganography_unit.py +82 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/PKG-INFO +398 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/SOURCES.txt +83 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/dependency_links.txt +1 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/not-zip-safe +1 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/requires.txt +39 -0
- zyracrypt-2.0.0/zyracrypt.egg-info/top_level.txt +6 -0
zyracrypt-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alqudimi Systems
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Include documentation and metadata files
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include requirements.txt
|
|
6
|
+
include pyproject.toml
|
|
7
|
+
include setup.py
|
|
8
|
+
include setup.cfg
|
|
9
|
+
|
|
10
|
+
# Include all documentation
|
|
11
|
+
recursive-include docs *.md *.rst *.txt
|
|
12
|
+
|
|
13
|
+
# Include test files
|
|
14
|
+
recursive-include tests *.py
|
|
15
|
+
|
|
16
|
+
# Exclude unnecessary files
|
|
17
|
+
global-exclude *.py[cod]
|
|
18
|
+
global-exclude __pycache__
|
|
19
|
+
global-exclude *.so
|
|
20
|
+
global-exclude .DS_Store
|
|
21
|
+
global-exclude *.egg-info
|
|
22
|
+
exclude .gitignore
|
|
23
|
+
prune .git
|
|
24
|
+
prune build
|
|
25
|
+
prune dist
|
|
26
|
+
prune .pytest_cache
|
|
27
|
+
prune .mypy_cache
|
|
28
|
+
prune .ruff_cache
|
|
29
|
+
prune __pycache__
|
zyracrypt-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zyracrypt
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Enterprise-grade cryptographic library providing advanced encryption, post-quantum cryptography, key management, threshold signatures, and secure enclaves
|
|
5
|
+
Home-page: https://github.com/AlqudimiSystems/zyracrypt
|
|
6
|
+
Author: Alqudimi Systems
|
|
7
|
+
Author-email: Alqudimi Systems <info@alqudimi.systems>
|
|
8
|
+
Maintainer-email: Alqudimi Systems <info@alqudimi.systems>
|
|
9
|
+
License: MIT
|
|
10
|
+
Project-URL: Homepage, https://github.com/AlqudimiSystems/zyracrypt
|
|
11
|
+
Project-URL: Documentation, https://github.com/AlqudimiSystems/zyracrypt/tree/main/docs
|
|
12
|
+
Project-URL: Repository, https://github.com/AlqudimiSystems/zyracrypt
|
|
13
|
+
Project-URL: Bug Tracker, https://github.com/AlqudimiSystems/zyracrypt/issues
|
|
14
|
+
Project-URL: Changelog, https://github.com/AlqudimiSystems/zyracrypt/releases
|
|
15
|
+
Keywords: cryptography,encryption,security,post-quantum,pqc,key-management,threshold-signatures,multi-party-computation,secure-enclaves,homomorphic-encryption,steganography,blockchain-crypto
|
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Information Technology
|
|
19
|
+
Classifier: Intended Audience :: Science/Research
|
|
20
|
+
Classifier: Topic :: Security :: Cryptography
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
29
|
+
Classifier: Operating System :: OS Independent
|
|
30
|
+
Classifier: Typing :: Typed
|
|
31
|
+
Requires-Python: >=3.8
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Requires-Dist: cryptography>=42.0.0
|
|
35
|
+
Requires-Dist: pynacl>=1.5.0
|
|
36
|
+
Requires-Dist: argon2-cffi>=23.1.0
|
|
37
|
+
Requires-Dist: pillow>=10.0.0
|
|
38
|
+
Provides-Extra: pqc
|
|
39
|
+
Requires-Dist: liboqs-python>=0.10.0; extra == "pqc"
|
|
40
|
+
Provides-Extra: api
|
|
41
|
+
Requires-Dist: flask>=3.0.0; extra == "api"
|
|
42
|
+
Requires-Dist: flask-cors>=4.0.0; extra == "api"
|
|
43
|
+
Provides-Extra: database
|
|
44
|
+
Requires-Dist: flask-sqlalchemy>=3.0.0; extra == "database"
|
|
45
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "database"
|
|
46
|
+
Provides-Extra: email
|
|
47
|
+
Requires-Dist: email-validator>=2.0.0; extra == "email"
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
50
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
51
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
52
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
53
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
54
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
55
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
56
|
+
Provides-Extra: docs
|
|
57
|
+
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
|
58
|
+
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "docs"
|
|
59
|
+
Provides-Extra: all
|
|
60
|
+
Requires-Dist: liboqs-python>=0.10.0; extra == "all"
|
|
61
|
+
Requires-Dist: flask>=3.0.0; extra == "all"
|
|
62
|
+
Requires-Dist: flask-cors>=4.0.0; extra == "all"
|
|
63
|
+
Requires-Dist: flask-sqlalchemy>=3.0.0; extra == "all"
|
|
64
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
|
65
|
+
Requires-Dist: email-validator>=2.0.0; extra == "all"
|
|
66
|
+
Dynamic: license-file
|
|
67
|
+
|
|
68
|
+
# ZyraCrypt ๐
|
|
69
|
+
|
|
70
|
+
**Enterprise-Grade Cryptographic Library for Python**
|
|
71
|
+
|
|
72
|
+
[](https://www.python.org/downloads/)
|
|
73
|
+
[](LICENSE)
|
|
74
|
+
[](https://github.com/yourusername/zyracrypt)
|
|
75
|
+
|
|
76
|
+
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.
|
|
77
|
+
|
|
78
|
+
## โจ Features
|
|
79
|
+
|
|
80
|
+
### ๐ Core Encryption
|
|
81
|
+
- **Symmetric Encryption**: AES-256-GCM, ChaCha20-Poly1305
|
|
82
|
+
- **Asymmetric Encryption**: RSA-2048/4096, ECDSA (P-256, P-384, P-521), ECDH
|
|
83
|
+
- **Post-Quantum Cryptography**: Kyber (KEM), Dilithium (Signatures)
|
|
84
|
+
- **Hybrid Encryption**: Classical + Post-Quantum combined for future-proof security
|
|
85
|
+
|
|
86
|
+
### ๐ Key Management
|
|
87
|
+
- Advanced key generation with multiple KDFs (Argon2id, Scrypt, PBKDF2)
|
|
88
|
+
- Secure key storage with encryption at rest
|
|
89
|
+
- Key rotation and versioning
|
|
90
|
+
- Envelope encryption with KMS integration
|
|
91
|
+
- Hardware Security Module (HSM) support
|
|
92
|
+
- Threshold key management
|
|
93
|
+
|
|
94
|
+
### ๐ก๏ธ Advanced Security
|
|
95
|
+
- **Threshold Signatures**: Shamir secret sharing with configurable thresholds
|
|
96
|
+
- **Multi-Signature Schemes**: Collaborative signing protocols
|
|
97
|
+
- **Multi-Party Computation (MPC)**: Secure distributed computations
|
|
98
|
+
- **Secure Enclaves**: Software and hardware-backed secure execution
|
|
99
|
+
- **Side-Channel Resistance**: Constant-time operations and memory protection
|
|
100
|
+
- **Algorithm Agility**: Easy migration between cryptographic algorithms
|
|
101
|
+
|
|
102
|
+
### ๐ Password Security
|
|
103
|
+
- Modern password hashing (Argon2id, Scrypt, PBKDF2)
|
|
104
|
+
- Password strength validation
|
|
105
|
+
- Secure password generation
|
|
106
|
+
- Breach detection ready
|
|
107
|
+
|
|
108
|
+
### ๐ฏ Specialized Features
|
|
109
|
+
- Plausible deniability layers
|
|
110
|
+
- Steganography for data hiding
|
|
111
|
+
- Secure memory zeroing
|
|
112
|
+
- File encryption utilities
|
|
113
|
+
- Secure session management
|
|
114
|
+
- Cryptographic audit logging
|
|
115
|
+
- Group end-to-end encryption
|
|
116
|
+
- Identity-based encryption (IBE)
|
|
117
|
+
|
|
118
|
+
## ๐ฆ Installation
|
|
119
|
+
|
|
120
|
+
### Prerequisites
|
|
121
|
+
- Python 3.10 or higher
|
|
122
|
+
- pip package manager
|
|
123
|
+
|
|
124
|
+
### Install from source
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Clone the repository
|
|
128
|
+
git clone https://github.com/yourusername/zyracrypt.git
|
|
129
|
+
cd zyracrypt
|
|
130
|
+
|
|
131
|
+
# Install in development mode
|
|
132
|
+
pip install -e .
|
|
133
|
+
|
|
134
|
+
# Or install with dev dependencies
|
|
135
|
+
pip install -e ".[dev]"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Dependencies
|
|
139
|
+
ZyraCrypt automatically installs the following dependencies:
|
|
140
|
+
- `cryptography` - Core cryptographic primitives
|
|
141
|
+
- `pynacl` - Modern cryptography (NaCl)
|
|
142
|
+
- `argon2-cffi` - Argon2 password hashing
|
|
143
|
+
- `liboqs-python` - Post-quantum cryptography
|
|
144
|
+
- `flask` & `flask-cors` - API framework
|
|
145
|
+
- `pillow` - Image processing for steganography
|
|
146
|
+
|
|
147
|
+
## ๐ Quick Start
|
|
148
|
+
|
|
149
|
+
### Basic Encryption
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
from core_cryptography.encryption_framework import EncryptionFramework
|
|
153
|
+
|
|
154
|
+
# Initialize the framework
|
|
155
|
+
framework = EncryptionFramework()
|
|
156
|
+
|
|
157
|
+
# Your data and key
|
|
158
|
+
key = b"your-32-byte-key-here-for-aes256" # 32 bytes for AES-256
|
|
159
|
+
data = b"Sensitive information to encrypt"
|
|
160
|
+
|
|
161
|
+
# Encrypt
|
|
162
|
+
algo, iv, ciphertext, tag = framework.encrypt(data, key, "AES-GCM")
|
|
163
|
+
print(f"Encrypted with {algo}")
|
|
164
|
+
|
|
165
|
+
# Decrypt
|
|
166
|
+
decrypted = framework.decrypt(algo, key, iv, ciphertext, tag)
|
|
167
|
+
print(f"Decrypted: {decrypted.decode()}")
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Key Management
|
|
171
|
+
|
|
172
|
+
```python
|
|
173
|
+
from key_management.key_manager import KeyManager
|
|
174
|
+
|
|
175
|
+
# Initialize key manager
|
|
176
|
+
key_manager = KeyManager()
|
|
177
|
+
|
|
178
|
+
# Generate a secure key from password
|
|
179
|
+
password = "MySecurePassword123!"
|
|
180
|
+
key_data = key_manager.key_generator.derive_key_from_password(
|
|
181
|
+
password,
|
|
182
|
+
algorithm="argon2"
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# Store the key securely
|
|
186
|
+
key_manager.key_store.store_key("my_key_id", key_data)
|
|
187
|
+
|
|
188
|
+
# Retrieve when needed
|
|
189
|
+
retrieved_key = key_manager.key_store.retrieve_key("my_key_id")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Threshold Signatures
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
from advanced_features.threshold_multisig_enhanced import ThresholdECDSA
|
|
196
|
+
|
|
197
|
+
# Create threshold ECDSA instance
|
|
198
|
+
threshold_ecdsa = ThresholdECDSA()
|
|
199
|
+
|
|
200
|
+
# Setup: 3-of-5 threshold signature scheme
|
|
201
|
+
participants = ["alice", "bob", "charlie", "dave", "eve"]
|
|
202
|
+
keypair = threshold_ecdsa.generate_threshold_keypair(
|
|
203
|
+
threshold=3,
|
|
204
|
+
total_participants=5,
|
|
205
|
+
participants=participants
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
# Sign a message (need 3 participants)
|
|
209
|
+
message = b"Important transaction data"
|
|
210
|
+
partial_signatures = []
|
|
211
|
+
|
|
212
|
+
for i, participant in enumerate(participants[:3]):
|
|
213
|
+
partial_sig = threshold_ecdsa.create_partial_signature(
|
|
214
|
+
keypair, i + 1, message, participant
|
|
215
|
+
)
|
|
216
|
+
partial_signatures.append(partial_sig)
|
|
217
|
+
|
|
218
|
+
# Combine signatures
|
|
219
|
+
final_signature = threshold_ecdsa.combine_partial_signatures(
|
|
220
|
+
keypair, partial_signatures, message
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
# Verify
|
|
224
|
+
is_valid = threshold_ecdsa.verify_threshold_signature(
|
|
225
|
+
keypair, final_signature, message
|
|
226
|
+
)
|
|
227
|
+
print(f"Signature valid: {is_valid}")
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Envelope Encryption with KMS
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from key_management.envelope_encryption_kms import (
|
|
234
|
+
EnvelopeEncryptionManager, KeyStorageLevel
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
# Initialize manager
|
|
238
|
+
manager = EnvelopeEncryptionManager()
|
|
239
|
+
|
|
240
|
+
# Generate data encryption key
|
|
241
|
+
key_id, wrapped_key = manager.generate_data_encryption_key(
|
|
242
|
+
purpose="database_encryption",
|
|
243
|
+
algorithm="AES-256-GCM",
|
|
244
|
+
security_level=KeyStorageLevel.HIGH_SECURITY
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
# Encrypt data with wrapped key
|
|
248
|
+
sensitive_data = b"Confidential database records"
|
|
249
|
+
encrypted = manager.encrypt_with_wrapped_key(wrapped_key, sensitive_data)
|
|
250
|
+
|
|
251
|
+
# Decrypt
|
|
252
|
+
decrypted = manager.decrypt_with_wrapped_key(wrapped_key, encrypted)
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## ๐ Documentation
|
|
256
|
+
|
|
257
|
+
### ๐ Comprehensive Arabic Documentation
|
|
258
|
+
|
|
259
|
+
**Complete documentation in Arabic (ุงูุนุฑุจูุฉ) covering every aspect of ZyraCrypt:**
|
|
260
|
+
|
|
261
|
+
๐ **[Start Here: Arabic Documentation Guide โ](docs/README_AR.md)**
|
|
262
|
+
|
|
263
|
+
The Arabic documentation includes 16 comprehensive guides:
|
|
264
|
+
|
|
265
|
+
#### ๐ฏ Quick Start
|
|
266
|
+
- **[00. Index & Navigation](docs/00-index.md)** - Complete documentation index
|
|
267
|
+
- **[01. Getting Started](docs/01-getting-started.md)** - Installation and setup
|
|
268
|
+
- **[02. Basic Encryption](docs/02-basic-encryption.md)** - AES, ChaCha20, RSA, ECDSA
|
|
269
|
+
- **[03. Key Management](docs/03-key-management.md)** - Secure key handling
|
|
270
|
+
|
|
271
|
+
#### ๐ Advanced Features
|
|
272
|
+
- **[04. Advanced Features](docs/04-advanced-features.md)** - Threshold signatures, MPC, side-channel protection
|
|
273
|
+
- **[05. Post-Quantum Crypto](docs/05-post-quantum.md)** - Kyber, Dilithium, hybrid encryption
|
|
274
|
+
- **[06. Practical Examples](docs/06-examples.md)** - Complete real-world implementations
|
|
275
|
+
- **[09. Data Protection](docs/09-data-protection.md)** - Compression, obfuscation, memory handling
|
|
276
|
+
- **[10. Specialized Security](docs/10-specialized-security.md)** - File encryption, steganography, secure deletion
|
|
277
|
+
- **[11. Blockchain Crypto](docs/11-blockchain-crypto.md)** - Block hashing, PoW, transactions
|
|
278
|
+
|
|
279
|
+
#### ๐ Reference & Support
|
|
280
|
+
- **[07. API Reference](docs/07-api-reference.md)** - Complete API documentation
|
|
281
|
+
- **[08. Security Best Practices](docs/08-security-best-practices.md)** - Security guidelines
|
|
282
|
+
- **[12. Troubleshooting](docs/12-troubleshooting.md)** - Common issues and solutions
|
|
283
|
+
- **[13. FAQ](docs/13-faq.md)** - Frequently asked questions
|
|
284
|
+
|
|
285
|
+
#### ๐ ๏ธ Production
|
|
286
|
+
- **[14. Deployment Guide](docs/14-deployment-guide.md)** - AWS, Docker, Kubernetes
|
|
287
|
+
- **[15. Performance Optimization](docs/15-performance-optimization.md)** - Speed and efficiency tips
|
|
288
|
+
|
|
289
|
+
**Coverage**: 100+ practical examples | 200+ pages | Every feature documented
|
|
290
|
+
|
|
291
|
+
## ๐งช Testing
|
|
292
|
+
|
|
293
|
+
Run the comprehensive test suite:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
python test_advanced_features.py
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Test coverage includes:
|
|
300
|
+
- โ
Envelope Encryption & KMS
|
|
301
|
+
- โ
Enhanced KDF & Password schemes
|
|
302
|
+
- โ
Algorithm Agility & Versioning
|
|
303
|
+
- โ
Threshold Signatures & Multisig
|
|
304
|
+
- โ
MPC & Secure Enclaves
|
|
305
|
+
- โ
Side-Channel Resistance
|
|
306
|
+
- โ ๏ธ Hybrid Post-Quantum Cryptography (optional)
|
|
307
|
+
|
|
308
|
+
**Current Test Results**: 6/7 tests passing (85.7%)
|
|
309
|
+
|
|
310
|
+
## ๐๏ธ Project Structure
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
zyracrypt/
|
|
314
|
+
โโโ core_cryptography/ # Core encryption algorithms
|
|
315
|
+
โ โโโ encryption_framework.py
|
|
316
|
+
โ โโโ symmetric_encryption.py
|
|
317
|
+
โ โโโ asymmetric_encryption.py
|
|
318
|
+
โ โโโ algorithm_agility_versioning.py
|
|
319
|
+
โโโ key_management/ # Key generation and management
|
|
320
|
+
โ โโโ key_manager.py
|
|
321
|
+
โ โโโ key_generator.py
|
|
322
|
+
โ โโโ envelope_encryption_kms.py
|
|
323
|
+
โ โโโ enhanced_kdf_password.py
|
|
324
|
+
โโโ advanced_features/ # Advanced cryptographic features
|
|
325
|
+
โ โโโ threshold_multisig_enhanced.py
|
|
326
|
+
โ โโโ secure_mpc_enclaves.py
|
|
327
|
+
โ โโโ hybrid_pqc_enhanced.py
|
|
328
|
+
โ โโโ side_channel_protection.py
|
|
329
|
+
โโโ data_protection/ # Data protection utilities
|
|
330
|
+
โ โโโ data_protection_manager.py
|
|
331
|
+
โ โโโ compression_unit.py
|
|
332
|
+
โ โโโ secure_memory_handling.py
|
|
333
|
+
โโโ specialized_security/ # Specialized security features
|
|
334
|
+
โ โโโ file_encryption_manager.py
|
|
335
|
+
โ โโโ steganography_unit.py
|
|
336
|
+
โ โโโ secure_session_manager.py
|
|
337
|
+
โโโ post_quantum_cryptography/ # Post-quantum algorithms
|
|
338
|
+
โโโ post_quantum_cryptography_unit.py
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## ๐ Security Features
|
|
342
|
+
|
|
343
|
+
### Side-Channel Protection
|
|
344
|
+
- Constant-time comparisons to prevent timing attacks
|
|
345
|
+
- Secure memory zeroing to prevent data leakage
|
|
346
|
+
- Protected random number generation
|
|
347
|
+
|
|
348
|
+
### Algorithm Agility
|
|
349
|
+
- Easy migration between cryptographic algorithms
|
|
350
|
+
- Version tracking for encrypted data
|
|
351
|
+
- Automatic algorithm deprecation detection
|
|
352
|
+
|
|
353
|
+
### Audit Logging
|
|
354
|
+
- Comprehensive cryptographic operation logging
|
|
355
|
+
- Tamper-evident audit trails
|
|
356
|
+
- Compliance-ready logging formats
|
|
357
|
+
|
|
358
|
+
## ๐ค Contributing
|
|
359
|
+
|
|
360
|
+
Contributions are welcome! Please follow these guidelines:
|
|
361
|
+
|
|
362
|
+
1. Fork the repository
|
|
363
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
364
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
365
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
366
|
+
5. Open a Pull Request
|
|
367
|
+
|
|
368
|
+
## ๐ License
|
|
369
|
+
|
|
370
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
371
|
+
|
|
372
|
+
## โ ๏ธ Security Notice
|
|
373
|
+
|
|
374
|
+
This library implements cryptographic primitives and should be used with care:
|
|
375
|
+
|
|
376
|
+
- Always use secure random keys of appropriate length
|
|
377
|
+
- Never reuse nonces/IVs with the same key
|
|
378
|
+
- Store keys securely and rotate them regularly
|
|
379
|
+
- Keep dependencies up to date
|
|
380
|
+
- Review the security best practices documentation
|
|
381
|
+
|
|
382
|
+
## ๐ Acknowledgments
|
|
383
|
+
|
|
384
|
+
Built with:
|
|
385
|
+
- [cryptography](https://github.com/pyca/cryptography) - Python cryptographic library
|
|
386
|
+
- [PyNaCl](https://github.com/pyca/pynacl) - Python binding to libsodium
|
|
387
|
+
- [liboqs-python](https://github.com/open-quantum-safe/liboqs-python) - Post-quantum cryptography
|
|
388
|
+
|
|
389
|
+
## ๐ Support
|
|
390
|
+
|
|
391
|
+
For questions, issues, or feature requests:
|
|
392
|
+
- Open an issue on [GitHub](https://github.com/yourusername/zyracrypt/issues)
|
|
393
|
+
- Check the [documentation](docs/)
|
|
394
|
+
- Review the [examples](docs/06-examples.md)
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
**Made with โค๏ธ by Alqudimi Systems**
|