Metadata-Version: 2.4
Name: theobex
Version: 1.3.0
Summary: Obex Encryption Protocol vS130Q426T
Author: Sequt
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

​🛡️ TheObex (vS130Q426T)

​TheObex is a high-performance, lightweight symmetric encryption protocol designed for internal data protection in Python projects. It utilizes a layered XOR-Permutation strategy with context-based key derivation.

​📦 Installation

```
pip install theobex
```

🛠️ Quick Start

```
from theobex import Obex

# 1. Initialization
cipher = Obex(key_path="master.key")

# 2. Encrypting Data (with context_id/user_id)
user_id = 777123
blob = cipher.encrypt("Secret message", user_id)

# 3. Decrypting Data
text = cipher.decrypt(blob, user_id)
print(text) # Output: Secret message
```

📊 Database Integration

​Use BLOB (SQLite), BYTEA (PostgreSQL), or BINARY (MySQL) fields.

```
encrypted_blob = cipher.encrypt(message_text, user_id)
cursor.execute("INSERT INTO messages (uid, data) VALUES (?, ?)", (user_id, encrypted_blob))
```

⚙️ Technical Specification

​Key Stretching: Master key processed via SHA-256.

​Salt: 128-bit random CSPRNG salt per encryption.

​Session Key: Hash(MasterKey + Salt + ContextID).

​Transformation: Multi-layered XOR with positional index obfuscation.

​⚠️ Security Warning

​Key Management: Loss of the master.key file results in permanent data loss.

​Protocol Use: Custom implementation (vS130Q426T). For financial or military compliance, use audited AES-GCM.

​📄 License

​MIT License.
