Skip to content

Example of verifying cryptographically signed and encrypted license files using Web Crypto with Ed25519 and AES-256-GCM.

License

Notifications You must be signed in to change notification settings

keygen-sh/example-js-cryptographic-license-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example JS Cryptographic License Files

This is an example of how to verify and decrypt cryptographic license files in a browser environment, using Ed25519 verification and AES-256-GCM encryption.

Warning

This example utilizes Web Crypto. You may need to enable certain flags in your browser if support has not landed yet, e.g. for Ed25519. For the best experience, use Firefox.

This example verifies the aes-256-gcm+ed25519 algorithm.

Running the example

First up, install dependencies with yarn:

yarn

Then run the server:

yarn start

You can either manually input or upload the example license file, or input your own values.

The following will happen:

  1. The license file's authenticity will be verified using Ed25519, by verifying its signature using the provided public key.
  2. The license file will be decrypted using the license key as the decryption key.

If everything checks out, the page will display the decrypted contents of the license file — the license object, with any included data. If it fails, review the error and check your inputs.

Questions?

Reach out at [email protected] if you have any questions or concerns!

About

Example of verifying cryptographically signed and encrypted license files using Web Crypto with Ed25519 and AES-256-GCM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published