diff --git a/CHANGES.md b/CHANGES.md
index 4f9d6044d..a8146868d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,15 @@
# Changes
+## Version 1.5.0
+
+Released 2024-10-12
+
+- [(#427) Introduce isDeno utility instead of isNode.](https://github.com/dajiaji/hpke-js/pull/427)
+- [(#425) Use codecove only to Deno v2.](https://github.com/dajiaji/hpke-js/pull/425)
+- [(#424) Add isDenoV1 for testing.](https://github.com/dajiaji/hpke-js/pull/424)
+- [(#423) Fix deno task test:* for Deno v2.](https://github.com/dajiaji/hpke-js/pull/423)
+- [(#422) Bump base deno version to v2.0.0.](https://github.com/dajiaji/hpke-js/pull/422)
+
## Version 1.4.3
Released 2024-10-07
diff --git a/README.md b/README.md
index 3a9fc59b9..db676cfc2 100644
--- a/README.md
+++ b/README.md
@@ -42,8 +42,6 @@ npm install hpke-js
Then, you can use it as follows:
```js
-// import { AeadId, CipherSuite, KdfId, KemId } from "hpke-js";
-// const { AeadId, CipherSuite, KdfId, KemId } = require("@hpke/hpke-js");
import {
Aes128Gcm,
CipherSuite,
@@ -52,19 +50,11 @@ import {
} from "@hpke/core";
async function doHpke() {
- // When using "@hpke/core", specify the cryptographic algorithm instances
- // as follows, instead of identities above:
const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
- // When using "hpke-js", specify the cryptographic algorithm as follows:
- // const suite = new CipherSuite({
- // kem: KemId.DhkemP256HkdfSha256,
- // kdf: KdfId.HkdfSha256,
- // aead: AeadId.Aes128Gcm,
- // });
// A recipient generates a key pair.
const rkp = await suite.kem.generateKeyPair();
@@ -118,15 +108,16 @@ try {
The hpke-js includes the following packages.
-| name | since | description |
-| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| hpke-js | v0.1.0- | The HPKE module supporting all of the ciphersuites defined in [RFC9180](https://datatracker.ietf.org/doc/html/rfc9180), which consists of the following @hpke/{core, dhkem-x25519, dhkem-x448, chacha20poly1305} internally. |
-| @hpke/core | v1.0.0- | 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. See [/core/README](https://github.com/dajiaji/hpke-js/blob/main/core/README.md). |
-| @hpke/chacha20poly1305 | v1.0.0- | The HPKE module extension for ChaCha20Poly1305 AEAD. See [/x/chacha20poly1305/README](https://github.com/dajiaji/hpke-js/blob/main/x/chacha20poly1305/README.md). |
-| @hpke/dhkem-x25519 | v1.0.0- | The HPKE module extension for DHKEM(X25519, HKDF-SHA256). See [/x/dhkem-x25519/README](https://github.com/dajiaji/hpke-js/blob/main/x/dhkem-x25519/README.md). |
-| @hpke/dhkem-x448 | v1.0.0- | The HPKE module extension for DHKEM(X448, HKDF-SHA512). See [/x/dhkem-x448/README](https://github.com/dajiaji/hpke-js/blob/main/x/dhkem-x448/README.md). |
-| @hpke/hybridkem-x25519-kyber768 | v1.2.1- | **EXPERIMENTAL AND NOT STANDARDIZED** The HPKE module extension for the hybrid post-quantum KEM currently named [X25519Kyber768Draft00](https://datatracker.ietf.org/doc/draft-westerbaan-cfrg-hpke-xyber768d00/). See [/x/hybridkem-x25519-kyber768/README](https://github.com/dajiaji/hpke-js/blob/main/x/hybridkem-x25519-kyber768/README.md). |
-| @hpke/dhkem-secp256k1 | v1.0.0- | **EXPERIMENTAL AND NOT STANDARDIZED** The HPKE module extension for DHKEM(secp256k1, HKDF-SHA256). See [/x/dhkem-secp256k1/README](https://github.com/dajiaji/hpke-js/blob/main/x/dhkem-secp256k1/README.md). |
+| name | since | description |
+| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| @hpke/core | [](https://www.npmjs.com/package/@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.
[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) |
+| @hpke/chacha20poly1305 | [](https://www.npmjs.com/package/@hpke/chacha20poly1305)
[](https://jsr.io/@hpke/chacha20poly1305) | The HPKE module extension for ChaCha20Poly1305 AEAD.
[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) |
+| @hpke/dhkem-x25519 | [](https://www.npmjs.com/package/@hpke/dhkem-x25519)
[](https://jsr.io/@hpke/dhkem-x25519) | The HPKE module extension for DHKEM(X25519, HKDF-SHA256).
[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) |
+| @hpke/dhkem-x448 | [](https://www.npmjs.com/package/@hpke/dhkem-x448)
[](https://jsr.io/@hpke/dhkem-x448) | The HPKE module extension for DHKEM(X448, HKDF-SHA512).
[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) |
+| hpke-js | [](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.
[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) |
+| @hpke/hpke-js | [](https://jsr.io/@hpke/hpke-js) | The JSR version of the above `hpke-js`.
[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) |
+| @hpke/hybridkem-x25519-kyber768 | [](https://www.npmjs.com/package/@hpke/hybridkem-x25519-kyber768)
[](https://jsr.io/@hpke/core) | **EXPERIMENTAL AND NOT STANDARDIZED**
The HPKE module extension for the hybrid post-quantum KEM currently named [X25519Kyber768Draft00](https://datatracker.ietf.org/doc/draft-westerbaan-cfrg-hpke-xyber768d00/).
[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) |
+| @hpke/dhkem-secp256k1 | [](https://www.npmjs.com/package/@hpke/dhkem-secp256k1)
[](https://jsr.io/@hpke/dhkem-secp256k1) | **EXPERIMENTAL AND NOT STANDARDIZED**
The HPKE module extension for DHKEM(secp256k1, HKDF-SHA256).
[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) |
## Supported Features
@@ -175,7 +166,7 @@ The hpke-js includes the following packages.
supported browsers
- Confirmed: Chrome, Firefox, Edge, Safari, Opera, Vivaldi, Brave
- **Node.js**: 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x
-- **Deno**: 1.x (1.25-)
+- **Deno**: 1.x, 2.x
- **Cloudflare Workers**
- **bun**: 0.x (0.6.0-), 1.x
diff --git a/SECURITY.md b/SECURITY.md
index 0655f8c4a..651b86a1d 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,12 +4,10 @@
| Version | Supported |
| ------- | ------------------ |
+| 1.5.x | :white_check_mark: |
| 1.4.x | :white_check_mark: |
-| 1.2.x | :white_check_mark: |
-| 1.2.8 | :x: |
-| 0.22.x | :white_check_mark: |
+| 1.3.x | :white_check_mark: |
| < 1.3 | :x: |
-| < 0.22 | :x: |
## Reporting a Vulnerability
diff --git a/deno.json b/deno.json
index 5ee49a00d..627b0e426 100644
--- a/deno.json
+++ b/deno.json
@@ -22,7 +22,7 @@
"**/*/*.js",
"**/*/npm/",
"**/*/.wrangler/",
- "coverage/*.json"
+ "coverage/"
]
},
"lint": {
@@ -31,7 +31,7 @@
"**/*/*.js",
"**/*/npm/",
"**/*/.wrangler/",
- "coverage/*.json"
+ "coverage/"
]
},
"test": {
@@ -41,7 +41,7 @@
"**/*/*.js",
"**/*/npm/",
"**/*/.wrangler/",
- "coverage/*.json"
+ "coverage/"
]
},
"tasks": {
diff --git a/npm/package-lock.json b/npm/package-lock.json
index 6eea57d91..9868fce4f 100644
--- a/npm/package-lock.json
+++ b/npm/package-lock.json
@@ -151,7 +151,7 @@
},
"packages/chacha20poly1305": {
"name": "@hpke/chacha20poly1305",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3",
@@ -169,7 +169,7 @@
},
"packages/common": {
"name": "@hpke/common",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"devDependencies": {
"@deno/shim-deno": "~0.18.0",
@@ -182,7 +182,7 @@
},
"packages/core": {
"name": "@hpke/core",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3"
@@ -198,7 +198,7 @@
},
"packages/dhkem-secp256k1": {
"name": "@hpke/dhkem-secp256k1",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3",
@@ -217,7 +217,7 @@
},
"packages/dhkem-x25519": {
"name": "@hpke/dhkem-x25519",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3",
@@ -236,7 +236,7 @@
},
"packages/dhkem-x448": {
"name": "@hpke/dhkem-x448",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3",
@@ -254,7 +254,7 @@
}
},
"packages/hpke-js": {
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/chacha20poly1305": "^1.4.3",
@@ -275,7 +275,7 @@
},
"packages/hybridkem-x25519-kyber768": {
"name": "@hpke/hybridkem-x25519-kyber768",
- "version": "1.4.3",
+ "version": "1.5.0",
"license": "MIT",
"dependencies": {
"@hpke/common": "^1.4.3",
diff --git a/packages/chacha20poly1305/deno.json b/packages/chacha20poly1305/deno.json
index 87a89b3c7..06e1b5d4d 100644
--- a/packages/chacha20poly1305/deno.json
+++ b/packages/chacha20poly1305/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/chacha20poly1305",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/ciphers": "npm:@noble/ciphers@^0.5.3"
diff --git a/packages/common/deno.json b/packages/common/deno.json
index 09b372cd4..6d7ed6e71 100644
--- a/packages/common/deno.json
+++ b/packages/common/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/common",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"publish": {
"exclude": [
diff --git a/packages/core/deno.json b/packages/core/deno.json
index 08e24ecf1..d7abee0ca 100644
--- a/packages/core/deno.json
+++ b/packages/core/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/core",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"publish": {
"exclude": [
diff --git a/packages/dhkem-secp256k1/deno.json b/packages/dhkem-secp256k1/deno.json
index 254231997..5762642d1 100644
--- a/packages/dhkem-secp256k1/deno.json
+++ b/packages/dhkem-secp256k1/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/dhkem-secp256k1",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/curves": "npm:@noble/curves@^1.4.2"
diff --git a/packages/dhkem-x25519/deno.json b/packages/dhkem-x25519/deno.json
index a0bf2141b..c1efe7ed2 100644
--- a/packages/dhkem-x25519/deno.json
+++ b/packages/dhkem-x25519/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/dhkem-x25519",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/curves": "npm:@noble/curves@^1.4.2",
diff --git a/packages/dhkem-x448/deno.json b/packages/dhkem-x448/deno.json
index 0ae5a16d8..e6489cced 100644
--- a/packages/dhkem-x448/deno.json
+++ b/packages/dhkem-x448/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/dhkem-x448",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/curves": "npm:@noble/curves@^1.4.2",
diff --git a/packages/hpke-js/deno.json b/packages/hpke-js/deno.json
index db9b08dd0..21b80d330 100644
--- a/packages/hpke-js/deno.json
+++ b/packages/hpke-js/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/hpke-js",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/hashes": "npm:@noble/hashes@^1.4.0"
diff --git a/packages/hybridkem-x25519-kyber768/deno.json b/packages/hybridkem-x25519-kyber768/deno.json
index 06036d237..45cdba3ec 100644
--- a/packages/hybridkem-x25519-kyber768/deno.json
+++ b/packages/hybridkem-x25519-kyber768/deno.json
@@ -1,6 +1,6 @@
{
"name": "@hpke/hybridkem-x25519-kyber768",
- "version": "1.4.3",
+ "version": "1.5.0",
"exports": "./mod.ts",
"imports": {
"@noble/hashes": "npm:@noble/hashes@^1.4.0"