The main forms
Piracy is not one problem. Each form needs a different defence, and some need none.
| Form | What happens | Fits defence |
|---|---|---|
| Key sharing | One buyer gives a valid key to friends or a team | Device limit |
| Leaked key | A valid key is posted publicly | Device limit, then revocation |
| Refund then keep | A buyer refunds the payment and keeps using the app | Revocation on refund |
| Keygen | A program generates keys that pass the check | Random server-checked keys |
| Crack or patched binary | The app is edited to skip the check | Little. See keygen and crack |
| Fake license server | The app is pointed at a server that always says yes | Signed responses |
Defences by cost to honest customers
Every measure also affects paying customers, so match the measure to the loss.
| Measure | Stops | Cost to customers |
|---|---|---|
| Device limit of 2 or 3 | Casual sharing | Low, if buyers can free a seat themselves |
| Revocation when an order is refunded | Refund then keep | None |
| Signature check on server answers | Fake license servers | None |
| Always-online checks | Offline copies | High: failures on planes, in outages, behind firewalls |
| Heavy copy protection | Some cracks, for a while | High: crashes, slow starts, support load |
| Paid features that run on your server | Patching | None, but only fits some products |
Most small sellers are well served by the first three rows. Heavy protection mostly punishes people who paid.
A leaked key, step by step
This is an example with made-up numbers. A key with a limit of 3 devices is posted online. The owner already uses 1 device, so 2 strangers activate it. The fourth attempt gets this answer from the License API:
{
"activated": false,
"error": "This license key has reached the activation limit."
}
The seller sees the key’s device list in the dashboard and disables the license. Disabled licenses answer valid: false from then on, and activation is refused with This license key has been disabled. Online copies learn this at their next launch. Offline copies keep working until the stored token’s refresh_by time, which is 14 days after issue. That delay is the price of letting honest customers work offline.
Piracy versus a lost sale
Not every unlicensed copy is a lost sale, and nobody can count the ones that are. Aggressive protection costs paying customers their patience. The useful question is which losses are cheap to prevent. A device limit and refund revocation prevent two common ones for nothing.
How Clavem handles it
Clavem gives you a device limit per product, set by default to 3 and changeable per license, a device page where buyers remove their own devices, and revocation that follows a full refund in Stripe or a click in the dashboard. Every answer carries an Ed25519-signed token. Clavem does not stop a patched binary, because an app that holds its own check can have that check removed. Read the longer discussion in stop software piracy without annoying customers, and see license revocation for how disabling works.
Questions
Can software piracy be stopped completely?
No. Anything that runs on a customer's machine can be modified by someone with enough skill. The realistic goal is to make paying easier than not paying and to limit casual sharing.
What is the cheapest defence against key sharing?
A device limit. It costs honest customers almost nothing and turns a key pasted into a forum into a key that stops working after a few activations.