Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for X-Wing. #444

Merged
merged 8 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
cp -rf ../dhkem-x448/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x448
mkdir test/runtimes/browsers/pages/hybridkem-x25519-kyber768
cp -rf ../hybridkem-x25519-kyber768/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x25519-kyber768
mkdir test/runtimes/browsers/pages/hybridkem-x-wing
cp -rf ../hybridkem-x-wing/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x-wing
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
cp -rf ../dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
- name: Build docs for @hpke/common
Expand All @@ -54,6 +56,7 @@ jobs:
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-common.js
- name: Build docs for @hpke/core
working-directory: ./packages/core
Expand All @@ -64,6 +67,7 @@ jobs:
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
- name: Build docs for @hpke/chacha20poly1305
working-directory: ./packages/chacha20poly1305
Expand All @@ -90,6 +94,11 @@ jobs:
run: |
npx typedoc --name "@hpke/dhkem-secp256k1 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
- name: Build docs for @hpke/hybridkem-x-wing
working-directory: ./packages/hybridkem-x-wing
run: |
npx typedoc --name "@hpke/hybridkem-x-wing" --out ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-hybridkem-x-wing.js
- name: Build docs for @hpke/hpke-js
working-directory: ./packages/hpke-js
run: |
Expand Down Expand Up @@ -117,6 +126,8 @@ jobs:
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hybridkem-x25519-kyber768/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hybridkem-x-wing/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/dhkem-secp256k1/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hpke-js/test/runtimes/browsers
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ jobs:
- name: Publish to npm (dry) for /packages/dhkem-secp256k1
working-directory: ./npm/packages/dhkem-secp256k1
run: npm publish --dry-run
- name: Run dnt & minify for /packages/hybridkem-x-wing
working-directory: ./packages/hybridkem-x-wing
run: |
deno task dnt
deno task minify > ../../npm/packages/hybridkem-x-wing/hpke-hybridkem-x-wing.min.js
- name: Publish to npm (dry) for /packages/hybridkem-x-wing
working-directory: ./npm/packages/hybridkem-x-wing
run: npm publish --dry-run
- name: Run dnt & minify for /packages/hpke-js
working-directory: ./packages/hpke-js
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ jobs:
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish @hpke/hybridkem-x-wing to npm
working-directory: ./npm/packages/hybridkem-x-wing
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish hpke-js to npm
working-directory: ./npm/packages/hpke-js
run: npm publish --provenance
Expand Down
30 changes: 21 additions & 9 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"./packages/dhkem-x448",
"./packages/dhkem-secp256k1",
"./packages/hybridkem-x25519-kyber768",
"./packages/hybridkem-x-wing",
"./packages/hpke-js",
"./packages/core/samples/deno",
"./packages/chacha20poly1305/samples/deno",
"./packages/dhkem-x25519/samples/deno",
"./packages/dhkem-x448/samples/deno",
"./packages/dhkem-secp256k1/samples/deno",
"./packages/hybridkem-x25519-kyber768/samples/deno",
"./packages/hybridkem-x-wing/samples/deno",
"./packages/hpke-js/samples/deno"
],
"fmt": {
Expand Down Expand Up @@ -54,85 +56,95 @@
"test:dhkem-x448": "cd packages/dhkem-x448 && deno task test",
"test:dhkem-secp256k1": "cd packages/dhkem-secp256k1 && deno task test",
"test:hybridkem-x25519-kyber768": "cd packages/hybridkem-x25519-kyber768 && deno task test",
"test:hybridkem-x-wing": "cd packages/hybridkem-x-wing && deno task test",
"test:hpke-js": "cd packages/hpke-js && deno task test",
"test:cloudflare": "deno task test:cloudflare:core && deno task test:cloudflare:chacha20poly1305 && deno task test:cloudflare:dhkem-x25519 && deno task test:cloudflare:dhkem-x448 && deno task test:cloudflare:dhkem-secp256k1 && deno task test:cloudflare:hybridkem-x25519-kyber768 && deno task test:cloudflare:hpke-js",
"test:cloudflare": "deno task test:cloudflare:core && deno task test:cloudflare:chacha20poly1305 && deno task test:cloudflare:dhkem-x25519 && deno task test:cloudflare:dhkem-x448 && deno task test:cloudflare:dhkem-secp256k1 && deno task test:cloudflare:hybridkem-x25519-kyber768 && deno task test:cloudflare:hybridkem-x-wing && deno task test:cloudflare:hpke-js",
"test:cloudflare:core": "cd npm && npm run test -w test/core/runtimes/cloudflare",
"test:cloudflare:chacha20poly1305": "cd npm && npm run test -w test/chacha20poly1305/runtimes/cloudflare",
"test:cloudflare:dhkem-x25519": "cd npm && npm run test -w test/dhkem-x25519/runtimes/cloudflare",
"test:cloudflare:dhkem-x448": "cd npm && npm run test -w test/dhkem-x448/runtimes/cloudflare",
"test:cloudflare:dhkem-secp256k1": "cd npm && npm run test -w test/dhkem-secp256k1/runtimes/cloudflare",
"test:cloudflare:hybridkem-x25519-kyber768": "cd npm && npm run test -w test/hybridkem-x25519-kyber768/runtimes/cloudflare",
"test:cloudflare:hybridkem-x-wing": "cd npm && npm run test -w test/hybridkem-x-wing/runtimes/cloudflare",
"test:cloudflare:hpke-js": "cd npm && npm run test -w test/hpke-js/runtimes/cloudflare",
"test:bun": "deno task test:bun:core && deno task test:bun:chacha20poly1305 && deno task test:bun:dhkem-x25519 && deno task test:bun:dhkem-x448 && deno task test:bun:dhkem-secp256k1 && deno task test:bun:hybridkem-x25519-kyber768 && deno task test:bun:hpke-js",
"test:bun": "deno task test:bun:core && deno task test:bun:chacha20poly1305 && deno task test:bun:dhkem-x25519 && deno task test:bun:dhkem-x448 && deno task test:bun:dhkem-secp256k1 && deno task test:bun:hybridkem-x25519-kyber768 && deno task test:bun:hybridkem-x-wing && deno task test:bun:hpke-js",
"test:bun:core": "cd packages/core && deno task test:bun",
"test:bun:chacha20poly1305": "cd packages/chacha20poly1305 && deno task test:bun",
"test:bun:dhkem-x25519": "cd packages/dhkem-x25519 && deno task test:bun",
"test:bun:dhkem-x448": "cd packages/dhkem-x448 && deno task test:bun",
"test:bun:dhkem-secp256k1": "cd packages/dhkem-secp256k1 && deno task test:bun",
"test:bun:hybridkem-x25519-kyber768": "cd packages/hybridkem-x25519-kyber768 && deno task test:bun",
"test:bun:hybridkem-x-wing": "cd packages/hybridkem-x-wing && deno task test:bun",
"test:bun:hpke-js": "cd packages/hpke-js && deno task test:bun",
"cov": "deno coverage ./coverage --lcov --exclude='test'",
"npm": "deno task dnt && deno task npm-link && deno task npm-pack && cd npm && npm install",
"dnt": "deno task dnt:common && deno task dnt:core && deno task dnt:chacha20poly1305 && deno task dnt:dhkem-x25519 && deno task dnt:dhkem-x448 && deno task dnt:dhkem-secp256k1 && deno task dnt:hybridkem-x25519-kyber768 && deno task dnt:hpke-js",
"dnt": "deno task dnt:common && deno task dnt:core && deno task dnt:chacha20poly1305 && deno task dnt:dhkem-x25519 && deno task dnt:dhkem-x448 && deno task dnt:dhkem-secp256k1 && deno task dnt:hybridkem-x25519-kyber768 && deno task dnt:hybridkem-x-wing && deno task dnt:hpke-js",
"dnt:common": "cd packages/common && deno task dnt",
"dnt:core": "cd packages/core && deno task dnt",
"dnt:chacha20poly1305": "cd packages/chacha20poly1305 && deno task dnt",
"dnt:dhkem-x25519": "cd packages/dhkem-x25519 && deno task dnt",
"dnt:dhkem-x448": "cd packages/dhkem-x448 && deno task dnt",
"dnt:dhkem-secp256k1": "cd packages/dhkem-secp256k1 && deno task dnt",
"dnt:hybridkem-x25519-kyber768": "cd packages/hybridkem-x25519-kyber768 && deno task dnt",
"dnt:hybridkem-x-wing": "cd packages/hybridkem-x-wing && deno task dnt",
"dnt:hpke-js": "cd packages/hpke-js && deno task dnt",
"npm-link": "deno task npm-link:common && deno task npm-link:core && deno task npm-link:chacha20poly1305 && deno task npm-link:dhkem-x25519 && deno task npm-link:dhkem-x448 && deno task npm-link:dhkem-secp256k1 && deno task npm-link:hybridkem-x25519-kyber768 && deno task npm-link:hpke-js",
"npm-link": "deno task npm-link:common && deno task npm-link:core && deno task npm-link:chacha20poly1305 && deno task npm-link:dhkem-x25519 && deno task npm-link:dhkem-x448 && deno task npm-link:dhkem-secp256k1 && deno task npm-link:hybridkem-x25519-kyber768 && deno task npm-link:hybridkem-x-wing && deno task npm-link:hpke-js",
"npm-link:common": "cd npm/packages/common && npm link",
"npm-link:core": "cd npm/packages/core && npm link",
"npm-link:chacha20poly1305": "cd npm/packages/chacha20poly1305 && npm link",
"npm-link:dhkem-x25519": "cd npm/packages/dhkem-x25519 && npm link",
"npm-link:dhkem-x448": "cd npm/packages/dhkem-x448 && npm link",
"npm-link:dhkem-secp256k1": "cd npm/packages/dhkem-secp256k1 && npm link",
"npm-link:hybridkem-x25519-kyber768": "cd npm/packages/hybridkem-x25519-kyber768 && npm link",
"npm-link:hybridkem-x-wing": "cd npm/packages/hybridkem-x-wing && npm link",
"npm-link:hpke-js": "cd npm/packages/hpke-js && npm link",
"npm-pack": "deno task npm-pack:common && deno task npm-pack:core && deno task npm-pack:chacha20poly1305 && deno task npm-pack:dhkem-x25519 && deno task npm-pack:dhkem-x448 && deno task npm-pack:dhkem-secp256k1 && deno task npm-pack:hybridkem-x25519-kyber768 && deno task npm-pack:hpke-js",
"npm-pack": "deno task npm-pack:common && deno task npm-pack:core && deno task npm-pack:chacha20poly1305 && deno task npm-pack:dhkem-x25519 && deno task npm-pack:dhkem-x448 && deno task npm-pack:dhkem-secp256k1 && deno task npm-pack:hybridkem-x25519-kyber768 && deno task npm-pack:hybridkem-x-wing && deno task npm-pack:hpke-js",
"npm-pack:common": "cd npm/packages/common && npm pack --dry-run",
"npm-pack:core": "cd npm/packages/core && npm pack --dry-run",
"npm-pack:chacha20poly1305": "cd npm/packages/chacha20poly1305 && npm pack --dry-run",
"npm-pack:dhkem-x25519": "cd npm/packages/dhkem-x25519 && npm pack --dry-run",
"npm-pack:dhkem-x448": "cd npm/packages/dhkem-x448 && npm pack --dry-run",
"npm-pack:dhkem-secp256k1": "cd npm/packages/dhkem-secp256k1 && npm pack --dry-run",
"npm-pack:hybridkem-x25519-kyber768": "cd npm/packages/hybridkem-x25519-kyber768 && npm pack --dry-run",
"npm-pack:hybridkem-x-wing": "cd npm/packages/hybridkem-x-wing && npm pack --dry-run",
"npm-pack:hpke-js": "cd npm/packages/hpke-js && npm pack --dry-run",
"bun-link": "deno task bun-link:common && deno task bun-link:core && deno task bun-link:chacha20poly1305 && deno task bun-link:dhkem-x25519 && deno task bun-link:dhkem-x448 && deno task bun-link:dhkem-secp256k1 && deno task bun-link:hybridkem-x25519-kyber768 && deno task bun-link:hpke-js",
"bun-link": "deno task bun-link:common && deno task bun-link:core && deno task bun-link:chacha20poly1305 && deno task bun-link:dhkem-x25519 && deno task bun-link:dhkem-x448 && deno task bun-link:dhkem-secp256k1 && deno task bun-link:hybridkem-x25519-kyber768 && deno task bun-link:hybridkem-x-wing && deno task bun-link:hpke-js",
"bun-link:common": "cd npm/packages/common && bun link",
"bun-link:core": "cd npm/packages/core && bun link",
"bun-link:chacha20poly1305": "cd npm/packages/chacha20poly1305 && bun link",
"bun-link:dhkem-x25519": "cd npm/packages/dhkem-x25519 && bun link",
"bun-link:dhkem-x448": "cd npm/packages/dhkem-x448 && bun link",
"bun-link:dhkem-secp256k1": "cd npm/packages/dhkem-secp256k1 && bun link",
"bun-link:hybridkem-x25519-kyber768": "cd npm/packages/hybridkem-x25519-kyber768 && bun link",
"bun-link:hybridkem-x-wing": "cd npm/packages/hybridkem-x-wing && bun link",
"bun-link:hpke-js": "cd npm/packages/hpke-js && bun link",
"sample": "deno task sample:deno && deno task sample:node",
"sample:deno": "deno task sample:deno:core && deno task sample:deno:chacha20poly1305 && deno task sample:deno:dhkem-x25519 && deno task sample:deno:dhkem-x448 && deno task sample:deno:dhkem-secp256k1 && deno task sample:deno:hybridkem-x25519-kyber768 && deno task sample:deno:hpke-js",
"sample:deno": "deno task sample:deno:core && deno task sample:deno:chacha20poly1305 && deno task sample:deno:dhkem-x25519 && deno task sample:deno:dhkem-x448 && deno task sample:deno:dhkem-secp256k1 && deno task sample:deno:hybridkem-x25519-kyber768 && deno task sample:deno:hybridkem-x-wing && deno task sample:deno:hpke-js",
"sample:deno:core": "cd packages/core && deno task sample:deno",
"sample:deno:chacha20poly1305": "cd packages/chacha20poly1305 && deno task sample:deno",
"sample:deno:dhkem-x25519": "cd packages/dhkem-x25519 && deno task sample:deno",
"sample:deno:dhkem-x448": "cd packages/dhkem-x448 && deno task sample:deno",
"sample:deno:dhkem-secp256k1": "cd packages/dhkem-secp256k1 && deno task sample:deno",
"sample:deno:hybridkem-x25519-kyber768": "cd packages/hybridkem-x25519-kyber768 && deno task sample:deno",
"sample:deno:hybridkem-x-wing": "cd packages/hybridkem-x-wing && deno task sample:deno",
"sample:deno:hpke-js": "cd packages/hpke-js && deno task sample:deno",
"sample:node": "deno task sample:node:core && deno task sample:node:chacha20poly1305 && deno task sample:node:dhkem-x25519 && deno task sample:node:dhkem-x448 && deno task sample:node:dhkem-secp256k1 && deno task sample:node:hybridkem-x25519-kyber768 && deno task sample:node:hpke-js",
"sample:node": "deno task sample:node:core && deno task sample:node:chacha20poly1305 && deno task sample:node:dhkem-x25519 && deno task sample:node:dhkem-x448 && deno task sample:node:dhkem-secp256k1 && deno task sample:node:hybridkem-x25519-kyber768 && deno task sample:node:hybridkem-x-wing && deno task sample:node:hpke-js",
"sample:node:core": "cd npm && npm run test -w samples/core",
"sample:node:chacha20poly1305": "cd npm && npm run test -w samples/chacha20poly1305",
"sample:node:dhkem-x25519": "cd npm && npm run test -w samples/dhkem-x25519",
"sample:node:dhkem-x448": "cd npm && npm run test -w samples/dhkem-x448",
"sample:node:dhkem-secp256k1": "cd npm && npm run test -w samples/dhkem-secp256k1",
"sample:node:hybridkem-x25519-kyber768": "cd npm && npm run test -w samples/hybridkem-x25519-kyber768",
"sample:node:hybridkem-x-wing": "cd npm && npm run test -w samples/hybridkem-x-wing",
"sample:node:hpke-js": "cd npm && npm run test -w samples/hpke-js",
"update:cloudflare": "deno task update:cloudflare:core || deno task update:cloudflare:chacha20poly1305 || deno task update:cloudflare:dhkem-x25519 || deno task update:cloudflare:dhkem-x448 || deno task update:cloudflare:dhkem-secp256k1 || deno task update:cloudflare:hybridkem-x25519-kyber768 || deno task update:cloudflare:hpke-js",
"update:cloudflare": "deno task update:cloudflare:core || deno task update:cloudflare:chacha20poly1305 || deno task update:cloudflare:dhkem-x25519 || deno task update:cloudflare:dhkem-x448 || deno task update:cloudflare:dhkem-secp256k1 || deno task update:cloudflare:hybridkem-x25519-kyber768 || deno task update:cloudflare:hybridkem-x-wing || deno task update:cloudflare:hpke-js",
"update:cloudflare:core": "cd packages/core/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:chacha20poly1305": "cd packages/chacha20poly1305/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:dhkem-x25519": "cd packages/dhkem-x25519/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:dhkem-x448": "cd packages/dhkem-x448/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:dhkem-secp256k1": "cd packages/dhkem-secp256k1/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:hybridkem-x25519-kyber768": "cd packages/hybridkem-x25519-kyber768/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:hybridkem-x-wing": "cd packages/hybridkem-x-wing/test/runtimes/cloudflare && npm audit fix",
"update:cloudflare:hpke-js": "cd packages/hpke-js/test/runtimes/cloudflare && npm audit fix"
}
}
Loading
Loading