You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3d3eda4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Sources/AmoreLicensing/Documentation.docc/Architecture & Security.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Server stores per-app private keys for signing JWTs. Clients verify signatures a
14
14
15
15
1. User enters license key in app
16
16
2. Client generates:
17
-
-Device ID from ``DeviceIdentity`` (the built-in macOS identity uses IOPlatformSerialNumber)
17
+
-Hardware ID: a salted hash of this device's identifier (see Device Identifier Privacy)
18
18
- Random nonce (UUID)
19
19
3. Client sends HTTPS POST to server:
20
20
{ license_key, hardware_id, nonce }
@@ -30,7 +30,7 @@ Server stores per-app private keys for signing JWTs. Clients verify signatures a
30
30
- JWT signature valid (using server's public key)
31
31
- Nonce matches what client sent
32
32
- JWT not expired
33
-
1. Client stores JWT in the file system
33
+
9. Client stores JWT in the file system
34
34
35
35
### Ongoing Validation (offline-first)
36
36
@@ -70,11 +70,17 @@ Server stores per-app private keys for signing JWTs. Clients verify signatures a
70
70
- Works without network until JWT expires
71
71
72
72
### Hardware Binding
73
-
- License tied to specific device via hardware ID
74
-
- JWT contains hardware ID (signed by server)
75
-
- Client verifies hardware ID on each validation
73
+
- License tied to a specific device via its hardware ID
74
+
- JWT contains the hardware ID (signed by server)
75
+
- Client verifies the JWT's hardware ID against this device on each validation
76
76
- Prevents JWT theft/sharing between devices
77
77
78
+
### Device Identifier Privacy
79
+
- The hardware ID is not the raw device identifier: it is an HMAC-SHA256 of it, keyed with the app's bundle identifier and prefixed `h1:`
80
+
- The raw device identifier (the built-in macOS ``DeviceIdentity`` reads IOPlatformSerialNumber) never leaves the device
81
+
- The bundle identifier salt makes the same device pseudonymous per app, so the server cannot correlate a device across apps
82
+
- Hashing defeats enumeration and leakage of device identifiers, not targeted confirmation: the salt is public, so a candidate identifier can be checked for a match
83
+
78
84
### Grace Period
79
85
- App continues working N days after last successful validation
80
86
- Handles temporary network outages or server downtime
Copy file name to clipboardExpand all lines: Sources/AmoreLicensing/Documentation.docc/Custom Device Identity.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ On macOS you can use this initializer too, to override the built-in identity.
49
49
-**Stable**: constant for the lifetime of the install. If it changes, the bound license stops validating and the user has to re-activate.
50
50
-**Unique**: distinct per device, so a license cannot be shared across machines.
51
51
52
+
Return the raw value; hashing is not your job. AmoreLicensing hashes the identifier, salted with the app's bundle identifier, before it leaves the device, so the raw value is never sent to the server and the same device produces a different ID in every app.
53
+
52
54
On Linux, for example, you might read `/etc/machine-id`:
0 commit comments