Skip to content

Experiment using SubtleCrypto to generate public/private keys to sign JWT's, and securely saving the CryptoKey object to IndexedDB securely without revealing the key values.

Notifications You must be signed in to change notification settings

cfu288/web-crypto-indexed-db

Repository files navigation

Using WebCrypto and IndexedDB to generate and persist encryption keys securely in the browser

See Live Demo

We can securely save the keys created with SubtleCrypto without exporting or exposing the keys by saving the CryptoKey object to IndexedDB. This will allow us to safely get and reuse the same keys in the future. This is important for some use cases like OAuth2's Dynamic Client Registration Protocol.

This repo uses WebCrypto and IndexedDB to securely sign and verify JWT's in the browser with persisted public/private keys.

Getting started

npm i
npm run dev

About

Experiment using SubtleCrypto to generate public/private keys to sign JWT's, and securely saving the CryptoKey object to IndexedDB securely without revealing the key values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published