In short
- An on-device model is a file, and a file can be copied: fine-tuned weights are often the most valuable thing a company ships.
- Encrypt the model and decrypt it only in memory, with a key sealed to the customer's own hardware.
- The model then loads on the licensed computer or phone, offline, and nowhere else.
- A licensee who can run the model can, with effort, dump it from memory; protection raises that cost and pairs with licence terms.
Why on-device AI needs protecting
Running AI on the customer's own machine means privacy, no per-query costs and no internet. It also means the weights leave your servers. A fine-tuned model, an embedding index or a speech model copied from one install works on every other, so the work behind it is lost the first time someone shares the folder.
Encrypt the model, seal the key
Ship the model encrypted. Pramaan seals the key that opens it to the customer's TPM, or on a phone to the Android Keystore or Secure Enclave. At launch the app checks the licence offline, decrypts the model into memory and hands it to the runtime (llama.cpp, ONNX Runtime, Core ML, TensorFlow Lite) without writing it to disk. Copied to another device, the encrypted model has nothing that can open it. See calling the licence check from your app.
What it can and can't do
Anyone entitled to run the model can, with enough effort, read it from memory while it runs; that's true of all client-side protection. What sealing does is stop casual copying entirely and make extraction deliberate, costly and a clear breach of the licence. For high-value models, pair it with terms that forbid extraction and with leak tracing on the app's other content.
Selling it
List the app on Pramaan Marketplace, where on-device AI apps sit in their own category, with a free trial and licence resale, or license it directly to enterprise customers whose machines never touch the internet.
Questions
How do I stop people copying my AI model?
Ship it encrypted and decrypt it only in memory with a key sealed to the customer's hardware. Pramaan does this, so a copied model opens on no other device.
Can the model still run offline?
Yes. The licence check and decryption happen on the device, with no connection needed.
Can an encrypted model be extracted?
A determined licensee can read a running model from memory; encryption stops casual copying and makes extraction deliberate and attributable to a licence.
Related guides
- How to License a Python, Electron or .NET AppAdd licensing and copy protection to a desktop app in any language: encrypt the valuable part and check the licence offline through a small C library.
- How to Protect Android and iPhone Apps From PiracyStop APK piracy and cracked iOS apps: seal licences to the Android Keystore or Secure Enclave, encrypt what you sell, and check licences offline on the phone.
- How to Protect Software From Piracy (2026 Guide)Practical ways to stop software piracy: why licence keys and checks get cracked, how hardware-bound licences and leak tracing work, and what works offline.
See it working: follow the pictures, browse Pramaan Marketplace, or start free.