Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
The CryptoKey interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods generateKey(), deriveKey(), importKey(), or unwrapKey().
For security reasons, the CryptoKey interface can only be used in a secure context.
The type of key the object represents. It may take one of the following values: "secret", "private" or "public".
CryptoKey.extractable Read onlyA boolean value indicating whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().
CryptoKey.algorithm Read onlyAn object describing the algorithm for which this key can be used and any associated extra parameters.
CryptoKey.usages Read onlyAn Array of strings, indicating what can be done with the key. Possible values for array elements are "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", and "unwrapKey".
The examples for SubtleCrypto methods often use CryptoKey objects. For example:
| Web Cryptography Level 2 # cryptokey-interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Nov 30, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.