From 3d7fccf408e76c7fed381a0b781e220dd850514f Mon Sep 17 00:00:00 2001 From: Ajitomi Daisuke Date: Sat, 10 Aug 2024 14:00:04 +0900 Subject: [PATCH] Deploy to DSR. --- core/deno.json | 3 +++ core/test/runtimes/browsers/playwright.config.ts | 3 ++- deno.json | 3 +++ src/cipherSuiteNative.ts | 6 +++--- src/interfaces/aeadInterface.ts | 2 +- src/interfaces/kdfInterface.ts | 2 +- src/interfaces/kemInterface.ts | 3 +-- src/kems/dhkem.ts | 2 +- test/runtimes/browsers/playwright.config.ts | 3 ++- x/chacha20poly1305/deno.json | 3 +++ .../test/runtimes/browsers/playwright.config.ts | 3 ++- x/dhkem-secp256k1/deno.json | 3 +++ x/dhkem-x25519/deno.json | 3 +++ .../test/runtimes/browsers/playwright.config.ts | 3 ++- x/dhkem-x448/deno.json | 3 +++ x/dhkem-x448/test/runtimes/browsers/playwright.config.ts | 3 ++- x/hybridkem-x25519-kyber768/deno.json | 3 +++ x/hybridkem-x25519-kyber768/test/conformance.test.ts | 9 +++------ .../test/runtimes/browsers/playwright.config.ts | 3 ++- 19 files changed, 43 insertions(+), 20 deletions(-) diff --git a/core/deno.json b/core/deno.json index d8b5cc7d7..67ea43d73 100644 --- a/core/deno.json +++ b/core/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/core", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/core/test/runtimes/browsers/playwright.config.ts b/core/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/core/test/runtimes/browsers/playwright.config.ts +++ b/core/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [ diff --git a/deno.json b/deno.json index 2ff69aa5d..be7f7c8ab 100644 --- a/deno.json +++ b/deno.json @@ -1,4 +1,7 @@ { + "name": "@dajiaji/hpke", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/src/cipherSuiteNative.ts b/src/cipherSuiteNative.ts index 94f51534d..bc0db771e 100644 --- a/src/cipherSuiteNative.ts +++ b/src/cipherSuiteNative.ts @@ -159,21 +159,21 @@ export class CipherSuiteNative extends NativeAlgorithm { /** * Gets the KEM context of the ciphersuite. */ - public get kem() { + public get kem(): KemInterface { return this._kem; } /** * Gets the KDF context of the ciphersuite. */ - public get kdf() { + public get kdf(): KdfInterface { return this._kdf; } /** * Gets the AEAD context of the ciphersuite. */ - public get aead() { + public get aead(): AeadInterface { return this._aead; } diff --git a/src/interfaces/aeadInterface.ts b/src/interfaces/aeadInterface.ts index 9822f21ba..3fa416cbf 100644 --- a/src/interfaces/aeadInterface.ts +++ b/src/interfaces/aeadInterface.ts @@ -1,6 +1,6 @@ import type { AeadEncryptionContext } from "./aeadEncryptionContext.ts"; -import { AeadId } from "../identifiers.ts"; +import type { AeadId } from "../identifiers.ts"; /** * The AEAD interface. diff --git a/src/interfaces/kdfInterface.ts b/src/interfaces/kdfInterface.ts index 0d3f17a34..da5771b9c 100644 --- a/src/interfaces/kdfInterface.ts +++ b/src/interfaces/kdfInterface.ts @@ -1,4 +1,4 @@ -import { KdfId } from "../identifiers.ts"; +import type { KdfId } from "../identifiers.ts"; /** * The KDF interface. diff --git a/src/interfaces/kemInterface.ts b/src/interfaces/kemInterface.ts index 9eb4b811f..42ad327ab 100644 --- a/src/interfaces/kemInterface.ts +++ b/src/interfaces/kemInterface.ts @@ -1,7 +1,6 @@ import type { RecipientContextParams } from "./recipientContextParams.ts"; import type { SenderContextParams } from "./senderContextParams.ts"; - -import { KemId } from "../identifiers.ts"; +import type { KemId } from "../identifiers.ts"; // b"KEM" export const SUITE_ID_HEADER_KEM = new Uint8Array([75, 69, 77, 0, 0]); diff --git a/src/kems/dhkem.ts b/src/kems/dhkem.ts index bb6f9232a..c107daffe 100644 --- a/src/kems/dhkem.ts +++ b/src/kems/dhkem.ts @@ -1,4 +1,5 @@ import type { KdfInterface } from "../interfaces/kdfInterface.ts"; +import type { KemId } from "../identifiers.ts"; import type { KemInterface } from "../interfaces/kemInterface.ts"; import type { DhkemPrimitives } from "../interfaces/dhkemPrimitives.ts"; import type { SenderContextParams } from "../interfaces/senderContextParams.ts"; @@ -6,7 +7,6 @@ import type { RecipientContextParams } from "../interfaces/recipientContextParam import { EMPTY, INPUT_LENGTH_LIMIT } from "../consts.ts"; import { DecapError, EncapError, InvalidParamError } from "../errors.ts"; -import { KemId } from "../identifiers.ts"; import { SUITE_ID_HEADER_KEM } from "../interfaces/kemInterface.ts"; import { concat, i2Osp, isCryptoKeyPair } from "../utils/misc.ts"; diff --git a/test/runtimes/browsers/playwright.config.ts b/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/test/runtimes/browsers/playwright.config.ts +++ b/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [ diff --git a/x/chacha20poly1305/deno.json b/x/chacha20poly1305/deno.json index a66ba5900..7ba4ce2d1 100644 --- a/x/chacha20poly1305/deno.json +++ b/x/chacha20poly1305/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/chacha20poly1305", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/x/chacha20poly1305/test/runtimes/browsers/playwright.config.ts b/x/chacha20poly1305/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/x/chacha20poly1305/test/runtimes/browsers/playwright.config.ts +++ b/x/chacha20poly1305/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [ diff --git a/x/dhkem-secp256k1/deno.json b/x/dhkem-secp256k1/deno.json index 9a4c74265..ff2605c0f 100644 --- a/x/dhkem-secp256k1/deno.json +++ b/x/dhkem-secp256k1/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/dhkem-secp256k1", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/x/dhkem-x25519/deno.json b/x/dhkem-x25519/deno.json index 44a5c08e6..d75fb1812 100644 --- a/x/dhkem-x25519/deno.json +++ b/x/dhkem-x25519/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/dhkem-x25519", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/x/dhkem-x25519/test/runtimes/browsers/playwright.config.ts b/x/dhkem-x25519/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/x/dhkem-x25519/test/runtimes/browsers/playwright.config.ts +++ b/x/dhkem-x25519/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [ diff --git a/x/dhkem-x448/deno.json b/x/dhkem-x448/deno.json index ffd4d483e..eb9befe4d 100644 --- a/x/dhkem-x448/deno.json +++ b/x/dhkem-x448/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/dhkem-x448", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/x/dhkem-x448/test/runtimes/browsers/playwright.config.ts b/x/dhkem-x448/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/x/dhkem-x448/test/runtimes/browsers/playwright.config.ts +++ b/x/dhkem-x448/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [ diff --git a/x/hybridkem-x25519-kyber768/deno.json b/x/hybridkem-x25519-kyber768/deno.json index 0ff99447b..2fa3f6248 100644 --- a/x/hybridkem-x25519-kyber768/deno.json +++ b/x/hybridkem-x25519-kyber768/deno.json @@ -1,4 +1,7 @@ { + "name": "@hpke/hybridkem-x25519-kyber768", + "version": "1.2.9", + "exports": "./mod.ts", "imports": { "@deno/dnt": "jsr:@deno/dnt@^0.41.2", "@std/assert": "jsr:@std/assert@1.0.0", diff --git a/x/hybridkem-x25519-kyber768/test/conformance.test.ts b/x/hybridkem-x25519-kyber768/test/conformance.test.ts index db507ec4c..050be9af7 100644 --- a/x/hybridkem-x25519-kyber768/test/conformance.test.ts +++ b/x/hybridkem-x25519-kyber768/test/conformance.test.ts @@ -1,12 +1,9 @@ import { assertEquals } from "@std/assert"; import { afterAll, beforeAll, describe, it } from "@std/testing/bdd"; -import { - Aes128Gcm, - CipherSuite, - HkdfSha256, - PreSharedKey, -} from "../../../core/mod.ts"; +import type { PreSharedKey } from "../../../core/mod.ts"; + +import { Aes128Gcm, CipherSuite, HkdfSha256 } from "../../../core/mod.ts"; import { hexToBytes } from "../../../test/utils.ts"; import { HybridkemX25519Kyber768 } from "../mod.ts"; import { TEST_VECTORS } from "./testVectors.ts"; diff --git a/x/hybridkem-x25519-kyber768/test/runtimes/browsers/playwright.config.ts b/x/hybridkem-x25519-kyber768/test/runtimes/browsers/playwright.config.ts index ec692f847..5d2c4e047 100644 --- a/x/hybridkem-x25519-kyber768/test/runtimes/browsers/playwright.config.ts +++ b/x/hybridkem-x25519-kyber768/test/runtimes/browsers/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts -import { devices, PlaywrightTestConfig } from "@playwright/test"; +import { devices } from "@playwright/test"; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { projects: [