Protected
_Protected
_Readonly
authReadonly
encThe length in bytes of an encapsulated key produced by this KEM (Nenc).
Readonly
idThe KEM identifier.
Readonly
nameReadonly
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).
Decapsulates the ss
(shared secret) from the enc
and the recipient's private key.
The enc
is the same as the ct
(ciphertext) resulting from X-Wing::Encapsulate(), which is executed under the
encap(). @param params The parameters for decapsulation. @returns {Promise<ArrayBuffer>} A promise that resolves with the shared secret. @throws {InvalidParamError} Thrown if the length of the
enc` is not 1120 bytes.
Encapsulates the shared secret and the ct
(ciphertext) as enc
.
The parameters for encapsulation.
A promise that resolves with the ss
(shared secret) as sharedSecret
and the ct
(ciphertext) as enc
.
Generates a new key pair.
A promise that resolves with a new key pair.
Imports a key from the input.
The format of the key. "raw" or "jwk" can be specified.
The key to import. If the format is "raw", the key must be an ArrayBuffer. If the format is "jwk", the key must be a JsonWebKey.
A boolean indicating whether the key is public or not. The default is true.
A promise that resolves with the imported key.
The Hybrid Post-Quantum KEM (X25519, Kyber768).
This class is implemented using pqc-kyber.
The instance of this class can be specified to the CipherSuiteParams as follows:
Example: Use with `@hpke/core`: