Secure license key generation, software activation, and hardware binding.
Project description
🔒 Sealium
Secure license key generation, software activation, and hardware binding.
✨ Features
| Feature | Description |
|---|---|
| 🔐 Hybrid Encryption | RSA-4096-OAEP key wrapping + AES-256-GCM payload |
| 🎫 License Keys | Cryptographically secure random keys (128-bit) |
| 💻 Hardware Binding | Bind licenses to specific machines (SHA-256 fingerprint) |
| ⏰ Expiration Control | Set expiry dates and feature flags |
| 🛡️ Anti-Replay | Timestamp window + nonce deduplication |
| 🌐 Client-Server | Ready-to-use FastAPI backend |
| 🔁 Idempotent | Same machine may reactivate safely |
📦 Installation
pip install sealium
🚀 Quick Example
from sealium.client.activator import Activator
# Client only needs the server's PUBLIC key.
activator = Activator(
server_url="http://localhost:8000/v1/activation",
server_public_key_pem=open("data/server_public.pem").read(),
)
response = activator.activate("your-license-key")
if response.result == "success":
print(f"✅ Activated until {response.authorized_until}")
print(f" Features: {response.features}")
else:
print(f"❌ {response.error_msg}")
🧱 Architecture
src/sealium/
├── common/ # Shared primitives (crypto, models, machine_code, time_source)
├── client/ # Activator + hybrid-encryption key manager
├── server/ # FastAPI app factory, routes, services, database, config
│ ├── routes/ # Thin HTTP layer
│ ├── services/ # activation_service, replay_guard (pure, injectable)
│ └── ...
└── scripts/ # generate_keys, generate_activation_codes
Key principle: no import side effects. Importing the package performs no I/O, no network calls, no hardware reads. Server resources (private key, DB) are initialized in the FastAPI lifespan and are injectable for testing.
See src/docs/mechanism.md for the full protocol specification.
🔧 Requirements
- Python 3.13+
- cryptography, requests, fastapi, uvicorn (wmi on Windows only)
🧪 Testing
pip install -e ".[dev]"
pytest
The test suite runs fully offline: the FastAPI server is driven in-process via
TestClient, the database is a throwaway SQLite file, and the timestamp source
is injected — no live server or network required.
📄 License
GPLv3 © Sealium Contributors
Built with ❤️ for Python developers
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 sealium-1.1.0.tar.gz.
File metadata
- Download URL: sealium-1.1.0.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7246a09603f0d3cffd966d15183ff094e07af9e39ca5d39b13794861b8b1b871
|
|
| MD5 |
564c377e4e8993286199bd12b9fef264
|
|
| BLAKE2b-256 |
da016488999cc43f5b927616d79f9dda7ded5a9200d8ed6da7aaa513e8cbd353
|
File details
Details for the file sealium-1.1.0-py3-none-any.whl.
File metadata
- Download URL: sealium-1.1.0-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe1ef77033175843d6a36eca9a4264c14184676af666ad427851ccd57ec89d0
|
|
| MD5 |
a17766671058920ff6abff246e90928a
|
|
| BLAKE2b-256 |
d0978f9bf377205b0fc8c47ae23cfbf6afef8a9cef35c4fc3f93c86e1b1eb551
|