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

x/hpke/core/src/native.ts>DhkemP256HkdfSha256

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

The DHKEM(P-256, HKDF-SHA256) 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.DhkemP256HkdfSha256 as follows:

Examples

Example 1

import {
  Aes128Gcm,
  CipherSuite,
  DhkemP256HkdfSha256,
  HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
  kem: new DhkemP256HkdfSha256(),
  kdf: new HkdfSha256(),
  aead: new Aes128Gcm(),
});