The CryptoKey interface represents a cryptographic key derived from a specific key algorithm.

A CryptoKey object can be obtained using SubtleCrypto.generateKey(), SubtleCrypto.deriveKey() or SubtleCrypto.importKey()


This interface doesn't inherit any property.

Returns an enumerated value representing the type of the key, a secret key (for symmetric algorithm), a public or a private key (for an asymmetric algorithm)
Returns a Boolean indicating if the raw information may be exported to the application or not.
Returns an opaque object representing a particular cipher the key has to be used with.
Returns an array of enumerated values indicating what the key can be used for.


This interface neither inherits, nor implements, any method.


Specification Status Comment
Web Cryptography API
The definition of 'CryptoKey' in that specification.
Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support37 Yes34 No ? No
type37 Yes34 No ? No
extractable37 Yes34 No ? No
algorithm37 Yes34 No ? No
usages37 Yes34 No ? No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support3737 Yes34 ? No ?
type3737 Yes34 ? No ?
extractable3737 Yes34 ? No ?
algorithm3737 Yes34 ? No ?
usages3737 Yes34 ? No ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, erikadoyle, teoli
 Last updated by: fscholz,