Offline Licenses

What is an offline license?

An offline license is a license that can be used in an offline or air-gapped computing environment, i.e. a device that has no or limited access to the public internet.

The simplest offline licenses are those which allow you to check their "authenticity", that the offline license key was indeed created by you. They have no embedded data, or at least, the data that is embedded into the key is not utilized within your code, i.e. it has no value.

More complex offline-capable licensing systems may have a useful dataset embedded inside of the key itself, which can be decoded/decrypted and utilized in your software. Embedded key datasets may include things like license expiration, grace periods and offline use limitations, customer and device information, and general license entitlement data.

How do I implement an offline license?

The easiest way to get started with an offline-capable license is to add a cryptographic scheme to a new Policy. Choosing a cryptographic scheme will instruct our systems to encrypt or sign all license keys which implement the Policy.

Many of these solutions can be packed into an easy-to-use and easy-to-distribute license file or certificate, and delivered via email, USB key or other means. This isn't required, but it does offer a better user experience when activating offline devices compared to copy and pasting (or worse: hand-typing!) long cryptographic license keys.

Cryptographic license files

Signed (and optionally encrypted) license files can be used in offline and air-gapped environments to distribute tamper-proof license and machine data. A license file consists of an encoded certificate, which typically looks something like this certificate below:

-----BEGIN LICENSE FILE-----
eyJlbmMiOiJsSTc4N0QwcGZua1RvRDVOSjFpRXlaU093Q09QQ0NOdktKZHpC
MlpSYlZBQzVsQUhjdzJSUi8xTEhrcXc0ZG5rUEl3TFVYRzhmUzk1R0JWTmtz
d2JDTmllWm1uOElHeGpkbUY2T1RmNjRzOHlpbFRpL3FlUzJSTlhBdGJBWjUw ...
QWtpVnBudmFWTFhVdkY1UGJJYjNFRXA0YlZNOU1xWjBhNjhQa1R1MW5VS0E0
QWRnV1FHWU1tU2hKdmIxbys0UFozYXU3a1FuWkZ1bWNPUUdUcllYRng1YVpZ
Wkw3SzhGMWFFRWh1clNmNzdwa25yWXRScnBmS2tUT2QvN3RaUXhQSW16bWpj
OTVGeWJlY0ladndEU2NTNGpRM2VCYlU0cHRFd056dlc5ay9JRFBja2N2eWdB
NFhhUnFsRkNZYlRDa1R3LzBZbUVxQnJVTThCYWpFZ3dTRWdvNG44c2N0UTNJ
VncxYkx6cnVFWDEzY1B3eX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ejVaVXRJ
SGZiOFRrNWdsYWlzN2VYNTdjYXlxOHdmeVFSOVJlQzNPR0l5YWUyblZ4ZzE3
RDBOeXBxTFJBOXFRMU1TSEFka2ZSMEdsWUpueFF4NThtT1J4Z2Fia2V5MExL
eE5hRzdzaytKMVljRnUyTEhCNnp3S0t0dThLZGdtVTdHdHZoZz0uQmFHSEZJ
TExMQ3dNb3RkRC5pejZ5N1NxS0R0QXhGWTNsUlluMVZBPT0iLCJzaWciOiJy
MWFjNjFocUcramZsc0p1RjFTUWRxUUQvYTd3L1Y4QndDMWNvdU5iaHo5ai9s
TlJWWGp6Ym5DRkF6V3lOU3NUeG9xZm9MV2FlWlhITEZnR21Ub2VBdz09Iiwi
YWxnIjoiYWVzLTI1Ni1nY20rZWQyNTUxOSJ9
-----END LICENSE FILE-----

This certificate is cryptographically signed using Ed25519 or 2048-bit RSA, and optionally encrypted using AES-256-GCM.

The embedded data payload contains a tamper-proof snapshot of a license or machine resource, with any included relationship data, as well as metadata indicating the expiration date of the license file.

License files can be generated via the API from an internet-connected device, such as a mobile device, and then transferred to devices in the air-gapped environment using email, a USB drive or other means.

The following cryptographic algorithms are available:

  • aes-256-gcm+ed25519
  • aes-256-gcm+rsa-pss-sha256
  • aes-256-gcm+rsa-sha256
  • base64+ed25519
  • base64+rsa-pss-sha256
  • base64+rsa-sha256

For further information on license files, check out the API reference.

View Documentation


Signed license keys

Signed license keys are made up of an encoded dataset and a signature. These values can be parsed in your software application and crytographically verified using ECC or RSA.

Below is a breakdown of a signed license key's format:

Diagram of a signed license key

The encoded dataset is completely under your control, and can be arbitrary text, a JSON object, XML, or any other text format. But you can also use the default dataset, which is a JSON object, if you don't have any specific requirements. In this example, we'll use the user's email.

Parsing the dataset and verifying its authenticity can be performed like so:

Diagram of verifying a signed license key

The signing prefix and encoded dataset are delimited by a / character (forward slash), while the signing data and the signature are delimited by a . character (dot).

The following policy signing schemes are available:

  • RSA_2048_PKCS1_PSS_SIGN_V2
  • RSA_2048_PKCS1_SIGN_V2
  • ED25519_SIGN

For further information on signing schemes, check out the API reference.

View Documentation


Encrypted license keys

Encrypted license keys are similar to signed keys, but the format is a lot simpler. Encrypted licence keys solely consist of an embedded dataset. In this example, we'll use the user's email address as the embedded dataset.

Below is an example of decrypting an encrypted key:

Diagram of decrypting an encrypted license key

Successfully decrypted keys can be utilized within your software, or discarded after a successful decryption if the embedded dataset is not needed elsewhere. Encrypted keys that fail decryption should be considered invalid.

The following policy encryption schemes are available:

  • RSA_2048_PKCS1_ENCRYPT

For further information on encryption schemes, check out the API reference.

View Documentation


Common embedded datasets

Common values we see embedded inside of cryptographic keys:

  • An expiration date (keep in mind that embedded data is immutable so expiration dates may not be the best choice for a renewable key)
  • The duration a license is allowed to be offline (e.g. 1 year of offline use before an online reactivation is required)
  • A fixed "grace period" for the license (e.g. the license is allowed to be used for 5 days after the expiration date)
  • The maximum application version to which the licensee is entitled
  • Known hardware or appliance identifiers (e.g. for node-locking licenses up-front)
  • Customer or licensee information (e.g. email address)
  • Other entitlement information

Code examples

Here are a few code examples our team has put together for implementing cryptographic licensing schemes in offline and air-gapped environments:

Here are some examples of utilizing response signatures:


Perpetual LicenseTimed LicenseFloating LicenseNode‑locked LicenseFeature License
Expiration DateNoYesOptionalOptionalOptional
Activation LimitsOptionalOptional> 01Optional
Feature LimitsOptionalOptionalOptionalOptionalYes
Offline SupportYesYesYesYesYes
Learn MoreLearn MoreLearn MoreLearn MoreLearn More