Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hpke/core/mod.ts>DhkemP521HkdfSha512

A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.
Latest
class DhkemP521HkdfSha512
extends DhkemP521HkdfSha512Native
import { DhkemP521HkdfSha512 } from "https://deno.land/x/hpke@1.2.9/core/mod.ts";

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

When using @hpke/core, the instance of this class must be specified to the kem parameter of CipherSuiteParams instead of KemId.DhkemP521HkdfSha512 as follows:

Examples

Example 1

import {
  Aes256Gcm,
  CipherSuite,
  DhkemP521HkdfSha512,
  HkdfSha512,
} from "http://deno.land/x/hpke/core/mod.ts";

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