Device identification
This page is for vendors and their users. It lists exactly what the SDK reads from a device, when it reads it, and what the server receives. The normative protocol rules are in protocol, section 5; this page adds the sources per operating system and the derivation.
Summary
- The SDK reads nothing before your app calls
activate. Configuring or starting the SDK reads no hardware feature. - It reads only what your app can already read with its current rights. It never asks for administrator or root rights and never shows an elevation prompt. A feature it cannot read is left out.
- It never sends a measured value. For each feature it sends a keyed digest, computed with a secret that never leaves the device (keyed-hwid). The server can only tell whether a digest is the same as before.
- Digests differ from product to product. Two vendors, or two products of one vendor, cannot link the same device.
- No location, network, user or host names are read. Extra signals need the user's consent and are off by default; protocol version 1 defines none.
- Where the device has a security chip your app may use, the SDK binds to a key in the chip instead of hardware features (see "Security chip" below).
Security chip
At activate the SDK first looks for a security chip. If there is one it may use with the app's current rights, it creates a P-256 key there that cannot leave the chip, one key per product. The device ID is the SHA-256 of the key's public part; no hardware feature is read then. Every later call of the activation is signed by the chip as well (protocol, section 6.7, "Chip key"), so a copy of the stored activation on another device stops working.
| System | Chip | Rights |
|---|---|---|
| Linux | TPM 2.0 through the kernel's resource manager /dev/tpmrm0 |
The user must be allowed to open /dev/tpmrm0, on most distributions as a member of the group tss. Otherwise the SDK binds by features |
| Windows | TPM through the Microsoft Platform Crypto Provider (NCrypt) | None beyond a normal user account. Without a TPM, or if a policy or a locked-out TPM makes the provider refuse, the SDK binds by features |
| Android | Android Keystore, StrongBox where the phone has one, else the TEE (Android package, Kotlin SDK) | None. A phone whose Keystore keeps keys in software only has no chip: the SDK then binds by installation ID |
| iOS | Secure Enclave through CryptoKit, or App Attest where the vendor set it up (Swift SDK) | None. With App Attest the app needs the App Attest capability. In the Simulator, or where App Attest is not supported, there is no chip: the SDK then binds by installation ID |
| macOS | Secure Enclave through Security.framework | The app must be signed with an App ID that a provisioning profile allows (com.apple.application-identifier and a keychain access group of your team; a Developer ID profile is enough), because the key lives in the data protection keychain. It must run in a user session, not as a launchd daemon. Otherwise, or on a Mac without a Secure Enclave, the SDK binds by features |
On Linux the key is a primary key that the TPM derives from its own seed and the product ID, so nothing about it is stored on disk. Clearing the TPM (for example in the firmware settings) gives a new key: the device then counts as a new one and activates again. On Windows the key is a persisted key of the signed-in user named license-sdk- and 32 hex characters derived from the product ID. It cannot be exported, and the SDK never shows a dialog for it. Clearing the TPM or a new user profile gives a new key, and the device activates again. On macOS the key is a permanent P-256 key of the Secure Enclave in the data protection keychain, labeled like the Windows key. It never syncs to other devices, and signing needs no prompt once the Mac was unlocked after start. Erasing the Mac or deleting the key gives a new one, and the device activates again.
On Android the key is a P-256 key of the Android Keystore with the same name as on Windows. Uninstalling the app or clearing its data deletes it, and the device activates again. Where the vendor set up Play Integrity for the product, the call that creates the activation also carries a Play Integrity token whose nonce is the SHA-256 of the signed request (protocol, section 6.7, "Chip key").
With App Attest on iOS the key lives in Apple's App Attest service and the device ID is its key ID. The activation carries the key's attestation and every later call an assertion, which Apple's servers vouch for. Apple attests a key once, so the next activation after a deactivation starts a new key. Deleting the app deletes the key as well.
Pass sdk_core::chip::NoChip to Client::with_chip to bind by features even where a chip is usable. An app that opens a chip key itself passes it as lsdk_chip with lsdk_config_set_chip in C (App Attest as lsdk_app_attest with lsdk_config_set_app_attest), or as LicenseChip in Java, Kotlin and Swift; the Android package does that with the Android Keystore.
Devices from your own production
If you build the hardware yourself and upload each device's factory certificate (device CAs and batches of the Management API), give the SDK the device's certificate, X.509 in DER: Client::with_device_certificate(der) in Rust, lsdk_config_set_device_certificate(cfg, der, len) in C, Config::set_device_certificate(der) in C++. The SDK sends it beside the chip key only with the call that creates the activation (protocol, section 6.7); later calls carry the signature alone. The certificate must name the key the SDK signs with on that device: the system chip's key for your product (in Rust sdk_core::chip::system().key(product_id) and its spki()), or the key of your own chip passed to Client::with_chip. The server then knows the device, and while you suspend or revoke it, or block its batch or CA, the activation is refused with blocked. Without a security chip the certificate is not sent and the SDK binds as usual.
The certificate also goes into the code of an offline request (offline_request), so a device can get its license in the factory before it was ever online: the factory station takes the request code over its local link, issues the file with POST /v1/offline-licenses and writes it back for import_offline (protocol, section 6.2, "In the factory"). The file works only on the device whose chip holds the key. Revoking the device ends its activations, so the next revocation list names them.
Features
| Feature ID | Windows | macOS | Linux |
|---|---|---|---|
os.machine_id |
Registry value MachineGuid in HKLM\SOFTWARE\Microsoft\Cryptography |
IOPlatformUUID, read with /usr/sbin/ioreg -rd1 -c IOPlatformExpertDevice |
/etc/machine-id, else /var/lib/dbus/machine-id |
os.system_volume_id |
Volume serial number of %SystemDrive% (GetVolumeInformationW) |
VolumeUUID of /, read with /usr/sbin/diskutil info -plist / |
File system UUID of /: the entry in /dev/disk/by-uuid that points to the root device |
hw.board_uuid |
SMBIOS system UUID as recorded in the registry value LastConfig in HKLM\SYSTEM\HardwareConfig |
Not used (same source as os.machine_id) |
/sys/class/dmi/id/product_uuid, only if readable without root (usually not) |
hw.cpu_model |
Registry value ProcessorNameString in HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0 |
/usr/sbin/sysctl -n machdep.cpu.brand_string |
First model name line of /proc/cpuinfo |
All of these are readable by a standard user. In containers, virtual machines and sandboxes some features are often missing; the SDK then binds by fewer features or, if none is readable, by an installation ID (protocol, section 5.1).
Never read: MAC addresses, IP addresses, Wi-Fi or network names, location, host name, user name, serial numbers of the device or its parts, and anything that needs elevated rights.
Changing this list is a protocol change. It is announced in the changelog of the SDK and needs an update of this page.
Normalization
Values are spelled the same way on every read before they are hashed: UUIDs lowercase with dashes (8-4-4-4-12), other IDs trimmed and lowercase, the CPU string with whitespace collapsed. Unset values and firmware placeholders (all zeros, all f, To be filled by O.E.M. and similar) are treated as unreadable.
Derivation
secret = 32 random bytes, created at the first activate, kept in the OS secure storage
key = HKDF-SHA256(salt = "keyed-hwid/v1", ikm = secret, info = product ID)
label = feature ID with "." replaced by "_"
digest = HMAC-SHA256(key, "keyed-hwid/v1" 0x00 "hardware" 0x00 label 0x00 value)
The SDK sends the 32-byte digest, base64url without padding. Its first 16 bytes are exactly the keyed-hwid part digest for the same key, label and value, so the server can use keyed-hwid's comparison and signals (two_devices, hardware_churn and others) on the truncated digests.
The secret makes the digests of a device unlinkable outside this product. It also means that a device whose secure storage was wiped (for example by reinstalling the operating system) looks like a new device. Your reset rules for devices apply then.
Matching
The server stores the digests of an activation and echoes them in the license token together with min_match, by default the number of features minus one. On every check the SDK measures again and compares:
- Replacing one part, such as a new system drive, keeps the license working.
- Changing two or more parts counts as another device. The user activates again or uses a device reset, depending on the vendor's rules.
- Features named as anchors must always match.
For SDK authors
crates/hwid implements the collectors and the derivation, crates/sdk-core (module device) exposes them to the SDK. The security chip is the trait sdk_core::chip::Chip; chip::tpm::Tpm::with talks to a TPM simulator, and crates/sdk-core/tests/tpm.rs runs against swtpm when TPM_SIMULATOR names its command port. Creating a Device reads nothing; only Device::measure reads, and only activate and later renewals call it. Tests in crates/sdk-core/tests/device.rs check that no feature is read before measuring and that one replaced part does not force a reset.