-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
126 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
{ | ||
"name": "@dajiaji/hpke", | ||
"version": "1.2.9", | ||
"workspace": [ | ||
"./core", | ||
"./x/chacha20poly1305", | ||
"./x/dhkem-secp256k1", | ||
"./x/dhkem-x25519", | ||
"./x/dhkem-x448", | ||
"./x/hybridkem-x25519-kyber768" | ||
], | ||
"exports": "./mod.ts", | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "jsr:@hpke/core@^1.2.9", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
}, | ||
|
@@ -16,8 +23,7 @@ | |
"deno.lock", | ||
"mod.ts", | ||
"mod_core.ts", | ||
"src/", | ||
"x/chacha20poly1305/src/" | ||
"src/" | ||
], | ||
"exclude": [ | ||
"core/LICENSE", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "npm:@hpke/core@^1.2.9", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,10 @@ | |
"name": "@hpke/chacha20poly1305", | ||
"version": "1.2.9", | ||
"exports": "./mod.ts", | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "jsr:@hpke/core@^1.2.9", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
}, | ||
"publish": { | ||
"exclude": [ | ||
"dnt.ts", | ||
"import_map.json", | ||
"samples/", | ||
"test/", | ||
"tsconfig.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "../../core/mod.ts", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,10 @@ | |
"name": "@hpke/dhkem-secp256k1", | ||
"version": "1.2.9", | ||
"exports": "./mod.ts", | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
}, | ||
"publish": { | ||
"exclude": [ | ||
"dnt.ts", | ||
"import_map.json", | ||
"samples/", | ||
"test/", | ||
"tsconfig.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "../../core/mod.ts", | ||
"@hpke/dhkem-x25519": "../dhkem-x25519/mod.ts", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// @ts-ignore: for "npm:" | ||
import { secp256k1 } from "npm:@noble/[email protected]/secp256k1"; | ||
|
||
import type { DhkemPrimitives, KdfInterface } from "../../../mod_core.ts"; | ||
import type { DhkemPrimitives, KdfInterface } from "@hpke/core"; | ||
|
||
import { | ||
DeriveKeyPairError, | ||
|
@@ -12,7 +12,7 @@ import { | |
NotSupportedError, | ||
SerializeError, | ||
XCryptoKey, | ||
} from "../../../mod_core.ts"; | ||
} from "@hpke/core"; | ||
|
||
const ALG_NAME = "ECDH"; | ||
const EMPTY = new Uint8Array(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,10 @@ | |
"name": "@hpke/dhkem-x25519", | ||
"version": "1.2.9", | ||
"exports": "./mod.ts", | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
}, | ||
"publish": { | ||
"exclude": [ | ||
"dnt.ts", | ||
"import_map.json", | ||
"samples/", | ||
"test/", | ||
"tsconfig.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "../../core/mod.ts", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { hmac } from "npm:@noble/[email protected]/hmac"; | |
// @ts-ignore: for "npm:" | ||
import { sha256 } from "npm:@noble/[email protected]/sha256"; | ||
|
||
import { HkdfSha256Native } from "../../../mod_core.ts"; | ||
import { HkdfSha256Native } from "@hpke/core"; | ||
|
||
export class HkdfSha256 extends HkdfSha256Native { | ||
public override async extract( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// @ts-ignore: for "npm:" | ||
import { x25519 } from "npm:@noble/[email protected]/ed25519"; | ||
|
||
import type { DhkemPrimitives, KdfInterface } from "../../../mod_core.ts"; | ||
import type { DhkemPrimitives, KdfInterface } from "@hpke/core"; | ||
|
||
import { | ||
base64UrlToBytes, | ||
|
@@ -13,7 +13,7 @@ import { | |
NotSupportedError, | ||
SerializeError, | ||
XCryptoKey, | ||
} from "../../../mod_core.ts"; | ||
} from "@hpke/core"; | ||
|
||
const ALG_NAME = "X25519"; | ||
const EMPTY = new Uint8Array(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,10 @@ | |
"name": "@hpke/dhkem-x448", | ||
"version": "1.2.9", | ||
"exports": "./mod.ts", | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
}, | ||
"publish": { | ||
"exclude": [ | ||
"dnt.ts", | ||
"import_map.json", | ||
"samples/", | ||
"test/", | ||
"tsconfig.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"imports": { | ||
"@deno/dnt": "jsr:@deno/dnt@^0.41.2", | ||
"@hpke/core": "../../core/mod.ts", | ||
"@std/assert": "jsr:@std/[email protected]", | ||
"@std/testing": "jsr:@std/testing@^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { hmac } from "npm:@noble/[email protected]/hmac"; | |
// @ts-ignore: for "npm:" | ||
import { sha512 } from "npm:@noble/[email protected]/sha512"; | ||
|
||
import { HkdfSha512Native } from "../../../mod_core.ts"; | ||
import { HkdfSha512Native } from "@hpke/core"; | ||
|
||
export class HkdfSha512 extends HkdfSha512Native { | ||
public override async extract( | ||
|
Oops, something went wrong.