Skip to content

Commit

Permalink
Add support for X-Wing.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Nov 3, 2024
1 parent d9957ad commit d033f1b
Show file tree
Hide file tree
Showing 39 changed files with 2,037 additions and 14 deletions.
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"
}
}
34 changes: 29 additions & 5 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"imports": {
"@dajiaji/mlkem": "npm:mlkem@^2.2.0",
"@noble/ciphers/chacha": "npm:@noble/ciphers@^0.5.3/chacha",
"@noble/curves/ed25519": "npm:@noble/curves@^1.4.2/ed25519",
"@noble/curves/ed448": "npm:@noble/curves@^1.4.2/ed448",
Expand Down
1 change: 1 addition & 0 deletions npm/import_map.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"imports": {
"@dajiaji/mlkem": "npm:mlkem@^2.2.0",
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
"@hpke/chacha20poly1305": "npm:@hpke/chacha20poly1305@^1.4.3",
"@hpke/common": "npm:@hpke/common@^1.4.3",
Expand Down
Loading

0 comments on commit d033f1b

Please sign in to comment.