{"id":15567410,"url":"https://github.com/dajiaji/hpke-js","last_synced_at":"2026-03-01T07:13:39.863Z","repository":{"id":37051951,"uuid":"489156455","full_name":"dajiaji/hpke-js","owner":"dajiaji","description":"A Hybrid Public Key Encryption (HPKE) module built on top of Web Cryptography API.","archived":false,"fork":false,"pushed_at":"2025-03-30T03:30:42.000Z","size":32243,"stargazers_count":75,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-10T05:52:03.326Z","etag":null,"topics":["aead","cryptography","encryption","hpke","kdf","kem","kyber","ml-kem","post-quantum","pqc","rfc9180","security","webcrypto","x-wing"],"latest_commit_sha":null,"homepage":"https://dajiaji.github.io/hpke-js/docs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dajiaji.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-05T23:38:42.000Z","updated_at":"2025-04-28T09:28:37.000Z","dependencies_parsed_at":"2024-02-25T02:32:58.063Z","dependency_job_id":"845e13fe-0e75-4c11-ac22-571396c3bbef","html_url":"https://github.com/dajiaji/hpke-js","commit_stats":{"total_commits":895,"total_committers":7,"mean_commits":"127.85714285714286","dds":0.3418994413407821,"last_synced_commit":"fac778d4f0b71abb52631b6da6faa879920e8829"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dajiaji%2Fhpke-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dajiaji%2Fhpke-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dajiaji%2Fhpke-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dajiaji%2Fhpke-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dajiaji","download_url":"https://codeload.github.com/dajiaji/hpke-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254150704,"owners_count":22023022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aead","cryptography","encryption","hpke","kdf","kem","kyber","ml-kem","post-quantum","pqc","rfc9180","security","webcrypto","x-wing"],"created_at":"2024-10-02T17:11:02.684Z","updated_at":"2026-03-01T07:13:39.852Z","avatar_url":"https://github.com/dajiaji.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ehpke-js\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/@hpke/core\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@hpke/core\" alt=\"npm\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://jsr.io/@hpke/core\"\u003e\u003cimg src=\"https://jsr.io/badges/@hpke/core\" alt=\"JSR\"/\u003e\u003c/a\u003e\n\u003cimg src=\"https://github.com/dajiaji/hpke-js/actions/workflows/ci_browser.yml/badge.svg\" alt=\"Browser CI\" /\u003e\n\u003cimg src=\"https://github.com/dajiaji/hpke-js/actions/workflows/ci_node.yml/badge.svg\" alt=\"Node.js CI\" /\u003e\n\u003cimg src=\"https://github.com/dajiaji/hpke-js/actions/workflows/ci.yml/badge.svg\" alt=\"Deno CI\" /\u003e\n\u003cimg src=\"https://github.com/dajiaji/hpke-js/actions/workflows/ci_cloudflare.yml/badge.svg\" alt=\"Cloudflare Workers CI\" /\u003e\n\u003cimg src=\"https://github.com/dajiaji/hpke-js/actions/workflows/ci_bun.yml/badge.svg\" alt=\"bun CI\" /\u003e\n\u003ca href=\"https://codecov.io/gh/dajiaji/hpke-js\"\u003e\n  \u003cimg src=\"https://codecov.io/gh/dajiaji/hpke-js/branch/main/graph/badge.svg?token=7I7JGKDDJ2\" alt=\"codecov\" /\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\nA TypeScript \u003ca href=\"https://datatracker.ietf.org/doc/html/rfc9180\"\u003eHybrid Public Key Encryption (HPKE)\u003c/a\u003e\nimplementation build on top of \u003ca href=\"https://www.w3.org/TR/WebCryptoAPI/\"\u003eWeb Cryptography API\u003c/a\u003e.\nThis module works on web browsers, Node.js, Deno and various other JavaScript runtimes.\n\u003c/div\u003e\n\n\u003cp\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nDocumentation: [jsr.io](https://jsr.io/@hpke/core/doc) |\n[pages (only for the latest ver.)](https://dajiaji.github.io/hpke-js/core/docs/)\n\n\u003c/div\u003e\n\nFor Node.js, you can install `@hpke/core` and other extensions via npm, yarn,\npnpm or jsr:\n\n```sh\n# Using npm:\nnpm install @hpke/core\nyarn add @hpke/core\npnpm install @hpke/core\n# Using jsr:\nnpx jsr add @hpke/core\nyarn add jsr:@hpke/core\npnpm add jsr:@hpke/core\n```\n\nFollowing extensions can be installed in the same manner:\n\n- `@hpke/chacha20poly1305`\n- `@hpke/dhkem-x25519`\n- `@hpke/dhkem-x448`\n- `@hpke/dhkem-secp256k1`\n- `@hpke/hybridkem-x-wing`\n- `@hpke/ml-kem`\n- `@hpke/hybridkem-x25519-kyber768` - deprecated\n\nThen, you can use it as follows:\n\n```js\nimport {\n  Aes128Gcm,\n  CipherSuite,\n  DhkemP256HkdfSha256,\n  HkdfSha256,\n} from \"@hpke/core\";\n\nasync function doHpke() {\n  const suite = new CipherSuite({\n    kem: new DhkemP256HkdfSha256(),\n    kdf: new HkdfSha256(),\n    aead: new Aes128Gcm(),\n  });\n\n  // A recipient generates a key pair.\n  const rkp = await suite.kem.generateKeyPair();\n\n  // A sender encrypts a message with the recipient public key.\n  const sender = await suite.createSenderContext({\n    recipientPublicKey: rkp.publicKey,\n  });\n  const ct = await sender.seal(new TextEncoder().encode(\"Hello world!\"));\n\n  // The recipient decrypts it.\n  const recipient = await suite.createRecipientContext({\n    recipientKey: rkp.privateKey,\n    enc: sender.enc,\n  });\n  const pt = await recipient.open(ct);\n\n  // Hello world!\n  console.log(new TextDecoder().decode(pt));\n}\n\ntry {\n  doHpke();\n} catch (e) {\n  console.log(\"failed:\", e.message);\n}\n```\n\n## Index\n\n- [Packages](#packages)\n- [Supported Features](#supported-features)\n- [Supported Environments](#supported-environments)\n- [Warnings and Restrictions](#warnings-and-restrictions)\n- [Contributing](#contributing)\n- [References](#references)\n\n## Packages\n\nThe hpke-js includes the following packages.\n\n| name                                         | registry                                                                                                                                                                                                                                                                  | description                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| @hpke/core                                   | [![npm](https://img.shields.io/npm/v/@hpke/core?color=%23EE3214)](https://www.npmjs.com/package/@hpke/core)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/core)](https://jsr.io/@hpke/core)                                                                                     | The HPKE core module implemented using only [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/). It does not support the X25519/X448-based KEMs and the ChaCha20/Poly1305 AEAD, but it has no external module dependencies. It's small in size and tree-shaking friendly.\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/core/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/core/samples) |\n| @hpke/chacha20poly1305                       | [![npm](https://img.shields.io/npm/v/@hpke/chacha20poly1305?color=%23EE3214)](https://www.npmjs.com/package/@hpke/chacha20poly1305)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/chacha20poly1305)](https://jsr.io/@hpke/chacha20poly1305)                                     | The HPKE module extension for ChaCha20Poly1305 AEAD.\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/chacha20poly1305/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/chacha20poly1305/samples)                                                                                                                                                                                                      |\n| @hpke/dhkem-x25519                           | [![npm](https://img.shields.io/npm/v/@hpke/dhkem-x25519?color=%23EE3214)](https://www.npmjs.com/package/@hpke/dhkem-x25519)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/dhkem-x25519)](https://jsr.io/@hpke/dhkem-x25519)                                                     | The HPKE module extension for DHKEM(X25519, HKDF-SHA256).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/dhkem-x25519/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/dhkem-x25519/samples)                                                                                                                                                                                                         |\n| @hpke/dhkem-x448                             | [![npm](https://img.shields.io/npm/v/@hpke/dhkem-x448?color=%23EE3214)](https://www.npmjs.com/package/@hpke/dhkem-x448)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/dhkem-x448)](https://jsr.io/@hpke/dhkem-x448)                                                             | The HPKE module extension for DHKEM(X448, HKDF-SHA512).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/dhkem-x448/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/dhkem-x448/samples)                                                                                                                                                                                                               |\n| hpke-js                                      | [![npm](https://img.shields.io/npm/v/hpke-js?color=%23EE3214)](https://www.npmjs.com/package/hpke-js)                                                                                                                                                                     | The HPKE module supporting all of the ciphersuites defined in [RFC9180](https://datatracker.ietf.org/doc/html/rfc9180), which consists of the above @hpke/{core, dhkem-x25519, dhkem-x448, chacha20poly1305} internally.\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/tree/main/packages/hpke-js/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/hpke-js/samples)                                                    |\n| @hpke/hpke-js                                | [![JSR](https://jsr.io/badges/@hpke/hpke-js)](https://jsr.io/@hpke/hpke-js)                                                                                                                                                                                               | The JSR version of the above `hpke-js`.\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/tree/main/packages/hpke-js/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/hpke-js/samples)                                                                                                                                                                                                                                     |\n| @hpke/ml-kem                                 | [![npm](https://img.shields.io/npm/v/@hpke/ml-kem?color=%23EE3214)](https://www.npmjs.com/package/@hpke/ml-kem)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/ml-kem)](https://jsr.io/@hpke/ml-kem)                                                                             | **EXPERIMENTAL AND NOT STANDARDIZED**\u003cbr/\u003eThe HPKE module extension for [ML-KEM](https://datatracker.ietf.org/doc/draft-connolly-cfrg-hpke-mlkem/).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/ml-kem/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/ml-kem/samples)                                                                                                                           |\n| @hpke/hybridkem-x-wing                       | [![npm](https://img.shields.io/npm/v/@hpke/hybridkem-x-wing?color=%23EE3214)](https://www.npmjs.com/package/@hpke/hybridkem-x-wing)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/hybridkem-x-wing)](https://jsr.io/@hpke/hybridkem-x-wing)                                     | **EXPERIMENTAL AND NOT STANDARDIZED**\u003cbr/\u003eThe HPKE module extension for [X-Wing: general-purpose hybrid post-quantum KEM](https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/hybridkem-x-wing/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/hybridkem-x-wing/samples)                                                               |\n| @hpke/hybridkem-x25519-kyber768 (deprelated) | [![npm](https://img.shields.io/npm/v/@hpke/hybridkem-x25519-kyber768?color=%23EE3214)](https://www.npmjs.com/package/@hpke/hybridkem-x25519-kyber768)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/hybridkem-x25519-kyber768)](https://jsr.io/@hpke/hybridkem-x25519-kyber768) | **EXPERIMENTAL AND NOT STANDARDIZED**\u003cbr/\u003eThe HPKE module extension for the hybrid post-quantum KEM currently named [X25519Kyber768Draft00](https://datatracker.ietf.org/doc/draft-westerbaan-cfrg-hpke-xyber768d00/).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/hybridkem-x25519-kyber768/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/hybridkem-x25519-kyber768/samples)                  |\n| @hpke/dhkem-secp256k1                        | [![npm](https://img.shields.io/npm/v/@hpke/dhkem-secp256k1?color=%23EE3214)](https://www.npmjs.com/package/@hpke/dhkem-secp256k1)\u003cbr/\u003e[![JSR](https://jsr.io/badges/@hpke/dhkem-secp256k1)](https://jsr.io/@hpke/dhkem-secp256k1)                                         | **EXPERIMENTAL AND NOT STANDARDIZED**\u003cbr/\u003eThe HPKE module extension for DHKEM(secp256k1, HKDF-SHA256).\u003cbr/\u003e[README](https://github.com/dajiaji/hpke-js/blob/main/packages/dhkem-secp256k1/README.md) / [samples](https://github.com/dajiaji/hpke-js/tree/main/packages/dhkem-secp256k1/samples)                                                                                                                                                      |\n\n## Supported Features\n\n### HPKE Modes\n\n| Base | PSK | Auth | AuthPSK |\n| ---- | --- | ---- | ------- |\n| ✅   | ✅  | ✅   | ✅      |\n\n### Key Encapsulation Machanisms (KEMs)\n\n| KEMs                           | Browser                               | Node.js                               | Deno                                  | Cloudflare\u003cbr\u003eWorkers                 | bun                                   |\n| ------------------------------ | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |\n| DHKEM (P-256, HKDF-SHA256)     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           |\n| DHKEM (P-384, HKDF-SHA384)     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           |\n| DHKEM (P-521, HKDF-SHA512)     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           |                                       | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core           |\n| DHKEM (X25519, HKDF-SHA256)    | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x25519   | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x25519   | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x25519   | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x25519   | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x25519   |\n| DHKEM (X448, HKDF-SHA512)      | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x448     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x448     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x448     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x448     | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/dhkem-x448     |\n| ML-KEM-512                     | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    |\n| ML-KEM-768                     | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    |\n| ML-KEM-1024                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    | ✅\u003cbr\u003e@hpke/ml-kem                    |\n| X-Wing                         | ✅\u003cbr\u003e@hpke/hybridkem-x-wing          | ✅\u003cbr\u003e@hpke/hybridkem-x-wing          | ✅\u003cbr\u003e@hpke/hybridkem-x-wing          | ✅\u003cbr\u003e@hpke/hybridkem-x-wing          | ✅\u003cbr\u003e@hpke/hybridkem-x-wing          |\n| Hybrid KEM (X25519, Kyber768)  | ✅\u003cbr\u003e@hpke/hybridkem-x25519-kyber768 | ✅\u003cbr\u003e@hpke/hybridkem-x25519-kyber768 | ✅\u003cbr\u003e@hpke/hybridkem-x25519-kyber768 | ✅\u003cbr\u003e@hpke/hybridkem-x25519-kyber768 | ✅\u003cbr\u003e@hpke/hybridkem-x25519-kyber768 |\n| DHKEM (secp256k1, HKDF-SHA256) | ✅\u003cbr\u003e@hpke/dhkem-secp256k1           | ✅\u003cbr\u003e@hpke/dhkem-secp256k1           | ✅\u003cbr\u003e@hpke/dhkem-secp256k1           | ✅\u003cbr\u003e@hpke/dhkem-secp256k1           | ✅\u003cbr\u003e@hpke/dhkem-secp256k1           |\n\n### Key Derivation Functions (KDFs)\n\n| KDFs        | Browser                          | Node.js                          | Deno                             | Cloudflare\u003cbr\u003eWorkers            | bun                              |\n| ----------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |\n| HKDF-SHA256 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) |\n| HKDF-SHA384 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) |\n| HKDF-SHA512 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core(\\*1) |\n\n- (\\*1) The HKDF functions built in `@hpke/core` can derive keys of the same\n  length as the hash size. If you want to derive keys longer than the hash size,\n  use `hpke-js`.\n\n### Authenticated Encryption with Associated Data (AEAD) Functions\n\n| AEADs                | Browser                                     | Node.js                                     | Deno                                        | Cloudflare\u003cbr\u003eWorkers                       | bun                                         |\n| -------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |\n| AES-128-GCM          | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 |\n| AES-256-GCM          | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 |\n| ChaCha20\u003cbr\u003ePoly1305 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/chacha\u003cbr\u003e20poly1305 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/chacha\u003cbr\u003e20poly1305 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/chacha\u003cbr\u003e20poly1305 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/chacha\u003cbr\u003e20poly1305 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/chacha\u003cbr\u003e20poly1305 |\n| Export Only          | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 | ✅\u003cbr\u003ehpke-js\u003cbr\u003e@hpke/core                 |\n\n## Supported Environments\n\n- **Web Browser**: [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/)\n  supported browsers\n  - Confirmed: Chrome, Firefox, Edge, Safari, Opera, Vivaldi, Brave\n- **Node.js**: 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x, 24.x\n- **Deno**: 2.x\n- **Cloudflare Workers**\n- **bun**: 0.x (0.6.0-), 1.x\n\n## Warnings and Restrictions\n\n- Although this library has been passed the following test vectors, it has not\n  been formally audited.\n  - [RFC9180 official test vectors provided on github.com/cfrg/draft-irtf-cfrg-hpke](https://github.com/cfrg/draft-irtf-cfrg-hpke/blob/5f503c564da00b0687b3de75f1dfbdfc4079ad31/test-vectors.json)\n  - [ECDH/X25519/X448 test vectors provided on Project Wycheproof](https://github.com/google/wycheproof)\n- The upper limit of the AEAD sequence number is further rounded to JavaScript's\n  MAX\\_SAFE\\_INTEGER (`2^53-1`).\n\n## Contributing\n\nWe welcome all kind of contributions, filing issues, suggesting new features or\nsending PRs. Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed\nguidelines on:\n\n- Development setup and prerequisites\n- Available development tasks\n- Code quality requirements\n- Project structure\n- Testing requirements\n- Documentation guidelines\n\n## References\n\n- [W3C: Web Cryptography API](https://www.w3.org/TR/2017/REC-WebCryptoAPI-20170126/)\n- [W3C/WICG: Secure Curves in the Web Cryptography API](https://wicg.github.io/webcrypto-secure-curves/)\n- [W3C: Web Cryptography API Level 2](https://w3c.github.io/webcrypto/)\n- [IETF/HPKE-WG: Hybrid Public Key Encryption](https://datatracker.ietf.org/doc/draft-ietf-hpke-hpke/)\n- [IETF/HPKE-WG: Post-Quantum and Post-Quantum/Traditional Hybrid Algorithms for HPKE](https://datatracker.ietf.org/doc/draft-ietf-hpke-pq)\n- [IRTF/CFRG: RFC9180: Hybrid Public Key Encryption](https://datatracker.ietf.org/doc/html/rfc9180)\n- [IRTF/CFRG: X25519Kyber768Draft00 hybrid post-quantum KEM for HPKE](https://datatracker.ietf.org/doc/html/draft-westerbaan-cfrg-hpke-xyber768d00)\n- [IRTF/CFRG: X-Wing: general-purpose hybrid post-quantum KEM](https://datatracker.ietf.org/doc/html/draft-connolly-cfrg-xwing-kem)\n- [IRTF/CFRG: Hybrid PQ/T Key Encapsulation Mechanisms](https://datatracker.ietf.org/doc/draft-irtf-cfrg-hybrid-kems/)\n- [IRTF/CFRG: Concrete Hybrid PQ/T Key Encapsulation Mechanisms](https://datatracker.ietf.org/doc/draft-irtf-cfrg-concrete-hybrid-kems/)\n- [IRTF/CFRG: Deterministic Nonce-less Hybrid Public Key Encryption](https://datatracker.ietf.org/doc/draft-irtf-cfrg-dnhpke/)\n- [IRTF/CFRG: SHA-3 for HPKE](https://datatracker.ietf.org/doc/draft-connolly-cfrg-sha3-hpke/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdajiaji%2Fhpke-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdajiaji%2Fhpke-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdajiaji%2Fhpke-js/lists"}