A hardware fingerprint feels like it binds a license to a machine. It does not. It binds the license to a string the machine computed about itself — a hash of the machine GUID, the volume serial, the CPU — and then sends that string to your server. Your server can only do one thing with it: check that the string it received equals the string it stored at activation. It cannot tell whether the request came from that hardware or from an attacker who copied the license file, read the fingerprint out of it, and sent the same bytes from a different machine. The fingerprint is data, and data copies.
The real question
Node-locking is really asking: is the thing presenting this license the same thing it was issued to? A fingerprint answers a weaker question — does this request carry the right string? — and those are only the same question if the string is a secret the attacker cannot obtain. It is not: the string is in the license file, in logs, on the wire. So the fingerprint check is a password you mailed to the user written on the outside of the envelope.
The stronger primitive is to make the device prove it holds something it cannot copy out of the file: a private key. Not a value the device knows, but a capability the device has. You verify possession by asking it to sign something new every time.
Provision a key on the device
At activation, the client generates an asymmetric key pair, keeps the private key in OS-protected storage, and sends only the public key to the issuing service. The private key never leaves the device.
// Client, once, during activation. using ECDsa device = ECDsa.Create(ECCurve.NamedCurves.nistP256); byte[] pkcs8 = device.ExportPkcs8PrivateKey(); _secureStore.Save("device-key", pkcs8); // DPAPI / Keychain / keyring — per user var activation = new ActivationRequest { LicenseKey = userEnteredKey, DevicePublicKey = Convert.ToBase64String(device.ExportSubjectPublicKeyInfo()), }; await _client.ActivateAsync(activation); The issuing service binds that public key into the signed license. It becomes a claim like any other — product, tier, expiry — and is covered by the vendor's signature, so it cannot be swapped after issuance.
// Issuing service. var claims = new LicenseClaims { LicenseId = "KR-7F3A-9C21", Product = "acme-suite", Tier = "pro", DevicePublicKey = request.DevicePublicKey, // bound into the signed payload ExpiresAt = DateTimeOffset.UtcNow.AddYears(1), }; LicenseEnvelope license = _issuer.Sign(claims); // vendor key signs the whole payload Now the license file contains a public key. That is safe to copy — a public key is not a secret. What makes the file useless on another machine is that it does not contain the matching private key, and cannot, because the private key was never sent anywhere.
Verify by challenge, not by comparison
Verification stops being a string comparison and becomes a two-signature handshake. The server issues a random, single-use challenge with a short lifetime. The device signs it with its private key. The server checks two things: that the license is authentic (the vendor signed it) and that the caller holds the private key for the device bound into that license.
// Server: hand out a fresh challenge, remember it briefly, one use only. byte[] challenge = RandomNumberGenerator.GetBytes(32); _challenges.Store(sessionId, challenge, ttl: TimeSpan.FromSeconds(30)); // Client: prove possession by signing the challenge it was given. byte[] pkcs8 = _secureStore.Load("device-key"); using ECDsa device = ECDsa.Create(); device.ImportPkcs8PrivateKey(pkcs8, out _); byte[] proof = device.SignData(challenge, HashAlgorithmName.SHA256); await _client.VerifyAsync(sessionId, license, Convert.ToBase64String(proof)); // Server: both signatures must hold. LicenseClaims claims = _vendor.Open(license); // 1. vendor signature over the payload using ECDsa device = ECDsa.Create(); device.ImportSubjectPublicKeyInfo( Convert.FromBase64String(claims.DevicePublicKey), out _); byte[] challenge = _challenges.Take(sessionId) ?? throw new LicenseException("challenge expired or already used"); if (!device.VerifyData(challenge, proof, HashAlgorithmName.SHA256)) // 2. possession throw new LicenseException("caller does not hold the bound device key"); The two signatures do different jobs and both are necessary. The vendor signature proves the license is real and that the device public key inside it is the one you bound — an attacker cannot mint a license for their own key pair. The device signature proves the caller is the device that license was bound to — an attacker cannot answer a challenge for a key pair they do not hold. Copying the file defeats neither: the thief gets an authentic license and a public key, signs the challenge with... nothing, because the private key stayed behind.
Fingerprints compare a string the attacker can copy. A device key makes verification a challenge only the holder of the private key can answer.Why the challenge must be fresh
The single-use, short-lived challenge is not decoration — it is what stops replay. If the server accepted a fixed string ("sign the license id"), an attacker who observed one valid proof on the wire could resend it forever, and you would be back to shipping a reusable secret. A random 32-byte challenge the device has never seen means a captured proof is worthless: it is a signature over last session's challenge, and this session's challenge is different. Store the challenge server-side with a tight TTL, delete it the moment it is consumed (Take, not Peek), and bind it to the session so a proof from one handshake cannot be smuggled into another.
Use ECDSA P-256 here because it is in the BCL (System.Security.Cryptography.ECDsa), is supported under Native AOT and trimming, and signs and verifies in microseconds — the handshake adds no meaningful latency. The device key is independent of your license signing key; rotating one does not touch the other.
When it still breaks
Proof-of-possession moves the attack from "copy a file" to "extract a private key," which is strictly harder — but it is not impossible, and the honesty matters. If the private key lives in a readable file, anyone who can run code as that user on that machine can lift it and clone the device; OS-protected per-user storage makes that require local code execution, and a TPM- or enclave-backed non-exportable key makes even that insufficient, because the key can be used but never read. Choose the strongest storage your platforms support and state the resulting threat model plainly.
Offline is the other limit. Without a server, there is no unpredictable challenge, so a fully offline verifier can only have the device sign a self-asserted value — the current time and the license id — and check it locally. That still defeats a bare file copy onto a key-less machine, but not an attacker who copied the extracted private key too. Treat offline binding as a bar-raiser and close the loop with a periodic online heartbeat that issues a real challenge whenever the device has connectivity. Finally, none of this survives a patched client that simply skips the check; pair it with fail-closed enforcement and, for distributed binaries, obfuscation of the verification path with Nebula.NET.
Takeaway
A fingerprint asks the device to describe itself and trusts the description. A bound device key asks the device to prove, with a signature over something it has never seen, that it holds a secret the license file does not contain. That one change turns node-locking from a string comparison an attacker can replay into a challenge an attacker cannot answer with a copied file. Bind the public key into the signed license, keep the private key in the strongest store the platform offers, and make every verification a fresh challenge.
Keyright is a self-hosted .NET licensing system — an issuing service plus SDK — with a free Community Edition. Device binding and the activation handshake are covered in the Keyright docs; for the hardware-hash approach this complements, see machine fingerprinting and hardware drift.
