Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hpke/src/kems/dhkemX448.ts>DhkemX448HkdfSha512

A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.
Latest
class DhkemX448HkdfSha512
extends Dhkem
import { DhkemX448HkdfSha512 } from "https://deno.land/x/hpke@1.2.7/src/kems/dhkemX448.ts";

The DHKEM(X448, HKDF-SHA512) for HPKE KEM implementing KemInterface.

This class is implemented using @noble/curves.

The instance of this class can be specified to the CipherSuiteParams as follows:

Examples

Use with hpke-js (https://deno.land/x/hpke/mod.ts).

import { CipherSuite, AeadId, KdfId } from "https://deno.land/x/hpke/mod.ts";
import { DhkemX448HkdfSha512 } from "https://deno.land/x/hpke/x/dhkem-x448/mod.ts";

const suite = new CipherSuite({
  kem: new DhkemX448HkdfSha512(),
  kdf: KdfId.HkdfSha512,
  aead: AeadId.Aes256Gcm,
});

Use with @hpke/core (https://deno.land/x/hpke/core/mod.ts).

import {
  Aes256Gcm,
  CipherSuite,
  HkdfSha512,
} from "https://deno.land/x/hpke/core/mod.ts";
import { DhkemX448HkdfSha512 } from "https://deno.land/x/hpke/x/dhkem-x448/mod.ts";

const suite = new CipherSuite({
  kem: new DhkemX448HkdfSha512(),
  kdf: new HkdfSha512(),
  aead: new Aes256Gcm(),
});

Constructors

new
DhkemX448HkdfSha512()

Properties

readonly
encSize: number

56

readonly
id: KemId

KemId.DhkemX448HkdfSha512 (0x0021)

readonly
privateKeySize: number

56

readonly
publicKeySize: number

56

readonly
secretSize: number

64