Readonly
encThe length in bytes of an encapsulated key produced by this KEM (Nenc).
Readonly
idThe KEM identifier.
Readonly
privateThe length in bytes of an encoded private key for this KEM (Nsk).
Readonly
publicThe length in bytes of an encoded public key for this KEM (Npk).
Readonly
secretThe length in bytes of a KEM shared secret produced by this KEM (Nsecret).
Recovers the ephemeral symmetric key from its encapsulated representation enc
.
If the error occurred, throws DecapError.
A set of parameters for the recipient context.
A shared secret as the output of the decapsulation step.
Derives a key pair from the byte string ikm.
If the error occurred, throws DeriveKeyPairError.
An input keying material.
A key pair derived.
Deserializes a private key as a byte string of length Nsk
to CryptoKey.
If the error occurred, throws DeserializeError.
A key as bytes.
A CryptoKey.
Deserializes a public key as a byte string of length Npk
to CryptoKey.
If the error occurred, throws DeserializeError.
A key as bytes.
A CryptoKey.
Generates an ephemeral, fixed-length symmetric key and
a fixed-length encapsulation of the key that can be decapsulated
by the holder of the private key corresponding to pkR
.
If the error occurred, throws EncapError.
A set of parameters for the sender context.
A shared secret and an encapsulated key as the output of the encapsulation step.
Generates a key pair.
If the error occurred, throws NotSupportedError.
A key pair generated.
Imports a public or private key and converts to a CryptoKey.
Since key parameters for createSenderContext or createRecipientContext are CryptoKey format, you have to use this function to convert provided keys to CryptoKey.
Basically, this is a thin wrapper function of SubtleCrypto.importKey.
If the error occurred, throws DeserializeError.
For now, 'raw'
and 'jwk'
are supported.
A byte string of a raw key or A JsonWebKey object.
Optional
isPublic: booleanThe indicator whether the provided key is a public key or not, which is used only for 'raw'
format.
A public or private CryptoKey.
Serializes a private key as CryptoKey to a byte string of length Nsk
.
If the error occurred, throws SerializeError.
A CryptoKey.
A key as bytes.
Serializes a public key as CryptoKey to a byte string of length Npk
.
If the error occurred, throws SerializeError.
A CryptoKey.
A key as bytes.
The KEM interface.