File encryption and licensing for AI models
Project description
inferlock
Protect AI model files with encryption and license-based runtime loading.
inferlock encrypts model files and loads them securely with expiration-based licenses.
Features
- Model file encryption
- Runtime in-memory decryption
- License-based loading
- Expiration-based license
- Single-command packaging
- Bundle-based distribution
- CLI-first design
Installation
pip install inferlock
or local dev:
pip install -e .
Quick Start
Encrypt model and create license:
inferlock encrypt model.pt --expire 30d
Output:
model.inferlock/
├── model.inferlock
└── license.inferlock
Load model:
from inferlock import load
model = load("model.inferlock")
CLI Usage
Encrypt model:
inferlock encrypt model.pt --expire 30d
Generate license manually:
inferlock license model.key --expire 30d
Show bundle info:
inferlock info model.inferlock
Device Binding
Bind license to machine:
inferlock encrypt model.pt --expire 30d --bind-device
The license will be tied to the current machine's MAC address and cannot be used on other devices.
Bundle Structure
model.inferlock/
├── model.inferlock
└── license.inferlock
Python API
Load bundle:
from inferlock import load
model = load("model.inferlock")
Load manually:
load("model.inferlock", "license.inferlock")
License Format
{
"key": "...",
"expire": "YYYY-MM-DD",
"version": 1
}
Version
v0.2.0
- license system
- expiration support
- bundle packaging
- single command encrypt + license
- auto bundle loader
v0.3.0
- device binding (MAC)
- per-device license
v0.4.0
- signed license
- tamper protection
v0.5.0
- encrypted license
- hidden key
Roadmap
Future features:
- multi-device license
- trial license
- offline activation
- hardware fingerprint
- bulk license generation
- license revoke
- metadata bundle
- verify command
Example
inferlock encrypt yolov7.weights --expire 7d
Load:
load("yolov7.inferlock")
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 inferlock-0.4.0.tar.gz.
File metadata
- Download URL: inferlock-0.4.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4874535a4bf82bd67be8cc5f9443a6bb6a683fcd5261d74fa12d4aeb427d01c
|
|
| MD5 |
02824692e38f27219004179a314d0d4e
|
|
| BLAKE2b-256 |
f0ee5c9cc9cafec52b0c6290faef25f05be454b240c40d593de32a0e28ecdbc2
|
File details
Details for the file inferlock-0.4.0-py3-none-any.whl.
File metadata
- Download URL: inferlock-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14fffe8d2f1c2c9619b632bf7e0230f7775f393f5431fdae08a1045de2eabfbc
|
|
| MD5 |
e5877b8cd3a6f1bcc9b060c5e552f8c3
|
|
| BLAKE2b-256 |
c3cdb8d5197f63d07df7e27002056fae49e602d591244fae9dad4fb063812513
|