Skip to content

Instantly share code, notes, and snippets.

  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rmhrisk/3f52d459ec72efcbba9e7f76ef0569f8 to your computer and use it in GitHub Desktop.
Progressive Web Applications, Isomorphic Javascript and Web Crypto

A Progressive Web Appplication uses modern web capabilities to deliver an app-like user experience, these applications are sometimes built as isomorphic web applications. In these cases, much of the code that runs on the client also runs the server.

This combination of approaches and the various technologies that make them possible are being used to build a new class of web applications that can often come together quicker and in many cases are indistinguishable from native applications.

So much so, thanks to Electron, you can often wrap these web applications as "native applications". These web-native applications look great too, if you use Slack or Visual Studio Code you know what I am talking about.

I believe Web Crypto is a great addition to this toolchain. With the Web Crypto these applications can incorporate strong, interoperable cryptography allowing the development of full client-server applications.

Though if you want to learn a bit more about what tools exist for you to build isomorphic web applications based on Web Crypto, I suggest this post.

What I wanted to cover here was a running list of the various libraries I am familiar with that are useful when building such applications. I will break this list into two chunks, the first of which being those I have experience with (many of which we have developed) and the second one being those I am aware of.

I am sure I have missed something, if so just let me know and I would be happy to update this list.

Related Libraries

Have Used

Description
pkijs PKIjs is a pure JavaScript library implementing the formats that are used in PKI applications.
tl-create A Node command line tool to create a X.509 trust list from various trust stores.
xadesjs A pure Typescript/Javascript implementation of XMLDSIG and XAdES-BES based on WebCrypto.
xadesjs-pro A pure Typescript/Javascript implementation of XMLDSIG and almost all XAdES profiles based on WebCrypto.
js-jose JavaScript library to encrypt/decrypt data in JSON Web Encryption (JWE) format and to sign/verify data in JSON Web Signature (JWS) format. Leverages Browser's native WebCrypto API.
webcrypto-liner A WebCrypto polyfill that "smooths out" the rough edges in existing User Agent implementations.
node-webcrypto-p11 A WebCrypto Polyfill for Node in TypeScript built on PKCS#11.
node-webcrypto-ossl A WebCrypto Polyfill for Node in TypeScript built on OpenSSL

Aware Of

Description
GOST WebCrypto A Javascript polyfill for Web Crypto that adds support for the Russian GOST cryptographic standards and provides basic support for X.509 related data structures and scenarios.
webcrypto-examples A set of examples of how to Web Crypto and a live table showing what your browser supports.
webcrypto-jwt JSON Web Tokens (JWT) verify/sign implementation using Web Crypto.
webcrypto-shim A minimal Web Crypto polyfill for legacy browsers that de-prefixes implementations and works around bugs in these browsers.
diasdavid-webcrypto A Web Crypto polyfill for Node based on Browserify
anvilresearch-webcrypto A Web Crypto polyfill for Node that provides a subset of Web Crypto for Node.js that is necessary to support protocols such as JOSE and OpenID Connect.
anvilresearch-jose JSON Object Signing and Encryption for Node.js and the browser based on Web Crypto.
anvilresearch- An OpenID Connect Relying Party client library for Node.js and the browser based on Web Crypto.
openpgpjs An OpenPGP implementation for JavaScript that uses Web Crypto for some of it's cryptographic needs.
libaxolotl-crypto-web Web Crypto implementation of the cryptography interface in libaxolotl-javascript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment