Skip to Content
Platform.Ontology

Web Crypto (non-extractable keys)

Provides built-in cryptography; keys can be stored in the browser and marked non-exportable.

Works without askingThings a page can doComputeWeb browsersWhile you use it

In one line

Can lock and unlock data inside the page, with keys it can't hand out

Provides built-in cryptography; keys can be stored in the browser and marked non-exportable.

A site can encrypt data, sign with keys it cannot export, and store them in IndexedDB. Non-extractable keys stop theft by script but do not stop a malicious page using them.

What it can and can't do

What the user does: Nothing. It happens when the page signs in, saves data or checks a file.

It can

  • Create secure keys and random numbers
  • Scramble and unscramble data
  • Check that a file has not been changed

It cannot

  • Hand out a key that was made non exportable
  • Reach keys saved by other sites
  • Work on a page that is not on a secure connection (HTTPS)
  • Keep its saved keys after you clear that site's data

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported372014-08-26None
EdgeSupported122015-07-29None
FirefoxSupported342014-12-01None
SafariSupported112017-09-19None
Safari on iPhoneSupported112017-09-19All iOS browsers use WebKit
Chrome on AndroidSupported372014-09-03None
Samsung InternetSupported3.02015-04-10None

How a site asks for it

APIcrypto.subtle.generateKey/importKey/sign/encrypt; extractable:false; crypto.randomUUID()
Browser compat keysapi.SubtleCrypto
api.Crypto.getRandomValues
api.CryptoKey
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
Activationnone
How long it lastsCryptoKey objects can be stored in IndexedDB as opaque handles
How to take it backNothing to revoke (no permission is stored)
Inside an iframeHTTPS only (crypto.subtle undefined on HTTP except localhost)

Typical flow

  1. Generate key with extractable false
  2. Store CryptoKey in IndexedDB
  3. Use sign() and decrypt() later

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • crypto.subtle only in secure contexts
  • Non-extractable keys cannot be exported via exportKey(), but any script on the origin can use them
  • getRandomValues fills at most 65536 bytes per call
  • Algorithms: AES-GCM and CBC and CTR, RSA-OAEP and PSS, ECDSA (P-256, P-384, P-521), ECDH, HMAC, HKDF, PBKDF2, SHA-1/256/384/512; Ed25519 (Chrome 137, Safari 17, Firefox 129), X25519
  • No hardware-backed keys (use WebAuthn for that)

The story

What it is

The browser has built in locks and keys that a page can use and store safely.

For you

You never see it. It quietly protects logins, chats and payments, and keeps your keys in a form that scripts cannot read out.

For makers

Makers use it to secure logins, sign messages and encrypt data in your browser before it leaves. Non exportable keys help stop theft even if the page is attacked.

Where you see it

TypeExampleApps
messagingA secure chat tool encrypts messages in your browser before sending.WhatsApp Web, Signal Desktop
bankingA bank page signs a login challenge with a key that never leaves the browser.None named
securityA password manager web app encrypts your vault locally.1Password, Bitwarden
productivityA notes app does end to end encryption of your documents.Proton Docs
gamesA browser game signs scores so cheaters cannot send fake ones.None named
adsAd scripts use random numbers from the same tool to create ids.None named

Risks

  • Misused by bad scripts
  • Ransomware style misuse

What the platform says

Good uses and abuse

Legitimate uses

  • Client-side encryption
  • Signing
  • Key derivation

Known abuse

  • Ransom-style encryption in page
  • Hidden persistent keys

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2015-04, Chrome 37: Web Crypto unprefixed
  • 2024-07, Firefox 129: Ed25519 support
  • 2025-05, Chrome 137: Ed25519 and X25519 support

Sources

How well checked: Based on official documentation.

On this page