Skip to main content
Batches set to offline, or online and offline can be checked by your own systems with no connection to Satyakod. Two ways, which you can combine: The key is better for large batches and for codes you didn’t download in advance; the list also tells you about revocations made after the key was loaded.

Get the verification key

1

Open the batch

Batches, then the batch. The key exists once the batch is signed.
2

Download the key

Under Offline checking, admins download Verification key · JSON. Each download is recorded in the audit log.
3

Load it into your system

Store it where your system keeps other secrets, never in an app or device that leaves your control.
An offline batch: Offline checking and its verification key

An offline batch: Offline checking and its verification key

B-1045-verification-key.json
Anyone who has a batch’s key can make serials that pass offline checks for that batch. It can’t make serials for any other batch or brand, and Satyakod’s own checks still catch copies (clone detection) once scans are uploaded. Keep keys in your factory and warehouse systems only: never ship one in a consumer app, a web page or a scanner you lend out.

Field scanners’ phones

Your field scanners can check offline batches in the Satyakod app without handling keys:
1

Enrol the phone

Settings → Offline devices: name the phone, choose the field scanner, then Enrol device. You get a one-time code, valid for 30 minutes.
2

Turn it on in the app

Signed in as that field scanner, Account → Offline checking, then type the code.
The phone keeps the keys of your offline batches (at the printer or printed) in its secure storage, for that person only, for 7 days; they renew whenever the screen is opened online. Results checked offline say so, and the scans are verified and recorded once the phone is back online. Revoke a phone under Offline devices and it loses its keys at its next sync; signing out of the app deletes them at once.

Check a serial

A serial is genuine for the batch when its tag equals the first 4 bytes of HMAC-SHA256(key, message), where the message is workspaceId|keyId| followed by the serial’s 6-byte batch sequence and index. See Serial numbers for the format.

Test your implementation

With the example key above:
The example key is made up for these docs. It belongs to no workspace, and its serials won’t pass Satyakod’s online checks.

What an offline check can’t tell you

  • Copies. A genuine serial printed twice passes offline. Satyakod’s clone check compares scans across places and times; upload your offline scans to get it.
  • Revocations after you loaded the key. Download the Serial list again, or check online when you can, for batches you have revoked codes from.

Upload scans made offline

When the device or plant is back online, send its scans to POST /v1/verify/offline, up to 500 at a time. Satyakod checks each as of when it was scanned and adds it to your scan history, alerts and reports.