Hardware-locked licensing
How hardware-locked licenses bind a key to a device: machine IDs per OS, why hardware IDs can be spoofed, device secrets, limits and customer resets.
Licensing concepts
License key security is about stopping three things: keys being shared beyond what the license allows, keys being forged with a key generator, and the license check being fooled by fake or replayed server answers. Random keys checked by a server defeat keygens, signed answers bound to each request defeat fakes and replays, and device binding makes sharing visible and limited. No licensing system can stop someone from patching the check out of a program, so keep what is valuable on the server.
Last updated
| Threat | What it looks like | What helps |
|---|---|---|
| Key sharing | One purchased key posted in a forum, or used by a whole team. | Device limits, device secrets, activation limits, detectors. |
| Key generators | A program that produces keys your application accepts. | Random keys that only the server can check. |
| Fake license server | The application is pointed at a server that says yes to everything. | Answers signed with a private key only your server holds. |
| Replayed answers | A recorded “valid” answer played back later or on another device. | Nonces, timestamps and device binding of the signed answer. |
| Brute force | Guessing keys against the server. | Long random keys, rate limits and IP blocks. |
| Leaked database | Someone gets a copy of the license database. | Keys stored only as keyed hashes. |
| Cracks | The check is patched out of the program. | Nothing on the client stops it; keep value on the server. |
Many older schemes generate keys with a checksum or a hidden formula that the application checks offline. Once someone reverse-engineers the formula, they can write a key generator that produces unlimited valid keys. The fix is to make a key a random lookup token: the application cannot tell a valid key from an invalid one; only the server can.
Velsigil keys look like PREFIX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX: an optional product prefix and 25 characters drawn from a 31-character alphabet by a cryptographic random generator, about 124 bits. Guessing one is not practical, and the server limits how fast anyone can try.
If an application trusted a plain “valid” from the network, anyone could stand up a fake server or edit the response. With an asymmetric signature, the server signs each answer with a private key, and the application verifies it with the matching public key built into it. A public key cannot create signatures, so extracting it from the binary does not help an attacker.
Velsigil gives each product its own Ed25519 key pair; the private key never leaves the server and is never exported. The SDKs verify the signature over the exact bytes of the answer before parsing anything, and never pick the key from the answer itself. That is also why the public key, product ID and API URL must be compiled in: a user who could change the public key in a settings file could run their own server with their own key.
Requests from the application are deliberately not signed: any secret embedded in a client binary can be extracted, so it would add no security.
A genuine signed answer is still dangerous if it can be reused. Velsigil binds every answer to its request:
clock_skew, and the SDK corrects its offset and retries once.replay_detected and raises a security event.A license database is a list of things people pay for. Velsigil never stores the raw key: the database keeps a keyed HMAC-SHA256 of it (keyed with the server’s master secret), the prefix and the last five characters for support. A key is shown once, when it is created or regenerated, and exports never contain raw keys. Regenerating a key creates a new one and invalidates the old key’s portal sessions and download links. Device secrets and API keys are likewise stored only as hashes.
You cannot stop a customer from telling a friend their key. You can make it pointless beyond the device limit, and visible when it happens:
Detectors only flag. Velsigil never bans a license automatically; you decide. The hardware-locked licensing guide covers device binding in detail.
The client API allows 60 requests a minute per IP address and 30 per license key and per hardware ID. Twenty or more invalid keys from one IP address within 10 minutes block that address from the client API for 30 minutes and raise a license_bruteforce event. On the Linux setup, Caddy adds an edge limit of 60 requests per 15 seconds per IP address.
Everything above makes server answers impossible to forge without your signing keys, and makes sharing visible. None of it stops a determined person from patching the check out of your program. Obfuscation, packers, native compilation and integrity checks raise the cost; none of them is a security boundary. Design with that in mind:
Attackers also go after the panel. Velsigil hashes staff passwords with Argon2id and rejects common and breached passwords; the breached-password check sends only the first five characters of a password’s hash. Owners and admins must use TOTP, and sensitive actions ask for the password and code again. Every change, sign-in and denied action goes to an audit log, kept for 365 days by default. If a product’s signing key leaks, rotate it: rotation destroys the old key and invalidates every build that embeds it, so plan it together with a client release.
Velsigil’s security requirements are based on OWASP ASVS 4.0.3 Level 2, a design target rather than a certification, and Velsigil has not had an external penetration test yet.
Keep reading
How hardware-locked licenses bind a key to a device: machine IDs per OS, why hardware IDs can be spoofed, device secrets, limits and customer resets.
How software checks a license without internet: signed offline leases, signed license files, grace periods, clock tampering and what each one trusts.
Validate license keys in C++17: Ed25519-signed answers via libsodium, device binding, offline leases and static Windows builds with CMake and vcpkg.
Tie license keys to Stripe subscriptions: paid renewals extend the license, cancellations let it lapse, and full refunds or lost disputes revoke it.
Early access
Early access is free. In exchange, we ask for your feedback while we prepare the paid launch. Spots are limited, and we reply to every request by email.
Early access ends when paid subscriptions launch; we will tell members by email before then. To keep using Velsigil after that, you need a subscription. The 30% discount applies to the first 12 months of either plan, paid monthly or yearly.
Opens your email app with a short template: company, what you sell, your platforms and languages, expected license volume and how you plan to deploy. You can also write to hello@velsigil.com.