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

Remove deno.land from doc. #435

Merged
merged 2 commits into from
Oct 13, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ try {

The hpke-js includes the following packages.

| name | since | description |
| name | registry | description |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| @hpke/core | [![npm](https://img.shields.io/npm/v/@hpke/core?color=%23EE3214)](https://www.npmjs.com/package/@hpke/core)<br/>[![JSR](https://jsr.io/badges/@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.<br/>[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 | [![npm](https://img.shields.io/npm/v/@hpke/chacha20poly1305?color=%23EE3214)](https://www.npmjs.com/package/@hpke/chacha20poly1305)<br/>[![JSR](https://jsr.io/badges/@hpke/chacha20poly1305)](https://jsr.io/@hpke/chacha20poly1305) | The HPKE module extension for ChaCha20Poly1305 AEAD.<br/>[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) |
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/aeads/aesGcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class AesGcmContext extends NativeAlgorithm
* CipherSuite,
* DhkemP256HkdfSha256,
* HkdfSha256,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand Down Expand Up @@ -124,7 +124,7 @@ export class Aes128Gcm implements AeadInterface {
* CipherSuite,
* DhkemP256HkdfSha256,
* HkdfSha256,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/aeads/exportOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AeadId, NotSupportedError } from "@hpke/common";
* DhkemP256HkdfSha256,
* ExportOnly,
* HkdfSha256,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/cipherSuiteNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const SUITE_ID_HEADER_HPKE = new Uint8Array([
* {@link https://www.w3.org/TR/WebCryptoAPI/ | Web Cryptography API}.
*
* This is the super class of {@link CipherSuite} and the same as
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuite | @hpke/core#CipherSuite },
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuite | @hpke/core#CipherSuite} as follows:
* which supports only the ciphersuites that can be implemented on the native
* {@link https://www.w3.org/TR/WebCryptoAPI/ | Web Cryptography API}.
* Therefore, the following cryptographic algorithms are not supported for now:
Expand Down
28 changes: 14 additions & 14 deletions packages/core/src/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
* {@link https://www.w3.org/TR/WebCryptoAPI/ | Web Cryptography API}.
*
* This class is the same as
* {@link https://deno.land/x/hpke/mod.ts?s=CipherSuiteNative | @hpke/core#CipherSuiteNative },
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuiteNative | @hpke/core#CipherSuiteNative} as follows:
* which supports only the ciphersuites that can be implemented on the native
* {@link https://www.w3.org/TR/WebCryptoAPI/ | Web Cryptography API}.
* Therefore, the following cryptographic algorithms are not supported for now:
Expand All @@ -30,7 +30,7 @@ import {
*
* If you want to use the unsupported cryptographic algorithms
* above or derive keys longer than the `hashSize`,
* please use {@link https://deno.land/x/hpke/mod.ts?s=CipherSuite | hpke-js#CipherSuite}.
* please use {@link https://jsr.io/@hpke/hpke-js/doc/~/CipherSuite | hpke-js#CipherSuite}.
*
* This class provides following functions:
*
Expand All @@ -52,7 +52,7 @@ import {
* DhkemP256HkdfSha256,
* HkdfSha256,
* CipherSuite,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand All @@ -64,8 +64,8 @@ import {
* @example Use a ciphersuite which is currently not supported by Web Cryptography API.
*
* ```ts
* import { Aes128Gcm, HkdfSha256, CipherSuite } from "http://deno.land/x/hpke/core/mod.ts";
* import { DhkemX25519HkdfSha256 } from "https://deno.land/x/hpke/x/dhkem-x25519/mod.ts";
* import { Aes128Gcm, HkdfSha256, CipherSuite } from "@hpke/core";
* import { DhkemX25519HkdfSha256 } from "@hpke/dhkem-x25519";
* const suite = new CipherSuite({
* kem: new DhkemX25519HkdfSha256(),
* kdf: new HkdfSha256(),
Expand All @@ -90,7 +90,7 @@ export class CipherSuite extends CipherSuiteNative {}
* CipherSuite,
* DhkemP256HkdfSha256,
* HkdfSha256,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand All @@ -116,7 +116,7 @@ export class DhkemP256HkdfSha256 extends DhkemP256HkdfSha256Native {}
* CipherSuite,
* DhkemP384HkdfSha384,
* HkdfSha384,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP384HkdfSha384(),
Expand All @@ -142,7 +142,7 @@ export class DhkemP384HkdfSha384 extends DhkemP384HkdfSha384Native {}
* CipherSuite,
* DhkemP521HkdfSha512,
* HkdfSha512,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP521HkdfSha512(),
Expand All @@ -161,7 +161,7 @@ export class DhkemP521HkdfSha512 extends DhkemP521HkdfSha512Native {}
*
* The KDF class can only derive keys of the same length as the `hashSize`.
* If you want to derive keys longer than the `hashSize`,
* please use {@link https://deno.land/x/hpke/mod.ts?s=CipherSuite | hpke-js#CipherSuite}.
* please use {@link https://jsr.io/@hpke/hpke-js/doc/~/CipherSuite | hpke-js#CipherSuite}.
*
* @example
*
Expand All @@ -171,7 +171,7 @@ export class DhkemP521HkdfSha512 extends DhkemP521HkdfSha512Native {}
* CipherSuite,
* DhkemP256HkdfSha256,
* HkdfSha256,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP256HkdfSha256(),
Expand All @@ -190,7 +190,7 @@ export class HkdfSha256 extends HkdfSha256Native {}
*
* The KDF class can only derive keys of the same length as the `hashSize`.
* If you want to derive keys longer than the `hashSize`,
* please use {@link https://deno.land/x/hpke/mod.ts?s=CipherSuite | hpke-js#CipherSuite}.
* please use {@link https://jsr.io/@hpke/hpke-js/doc/~/CipherSuite | hpke-js#CipherSuite}.
*
* @example
*
Expand All @@ -200,7 +200,7 @@ export class HkdfSha256 extends HkdfSha256Native {}
* CipherSuite,
* DhkemP384HkdfSha384,
* HkdfSha384,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP384HkdfSha384(),
Expand All @@ -219,7 +219,7 @@ export class HkdfSha384 extends HkdfSha384Native {}
*
* The KDF class can only derive keys of the same length as the `hashSize`.
* If you want to derive keys longer than the `hashSize`,
* please use {@link https://deno.land/x/hpke/mod.ts?s=CipherSuite | hpke-js#CipherSuite}.
* please use {@link https://jsr.io/@hpke/hpke-js/doc/~/CipherSuite | hpke-js#CipherSuite}.
*
* @example
*
Expand All @@ -229,7 +229,7 @@ export class HkdfSha384 extends HkdfSha384Native {}
* CipherSuite,
* DhkemP521HkdfSha512,
* HkdfSha512,
* } from "http://deno.land/x/hpke/core/mod.ts";
* } from "@hpke/core";
*
* const suite = new CipherSuite({
* kem: new DhkemP521HkdfSha512(),
Expand Down
24 changes: 4 additions & 20 deletions packages/dhkem-secp256k1/src/dhkemSecp256k1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,17 @@ import { Secp256k1 } from "./secp256k1.ts";
* The public keys are assumed to be compressed.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example Use with `hpke-js` (`https://deno.land/x/hpke/mod.ts`).
*
* ```ts
* import { AeadId, CipherSuite, KdfId } from "https://deno.land/x/hpke/mod.ts";
* import { DhkemSecp256k1HkdfSha256 } from "https://deno.land/x/hpke/x/dhkem-secp256k1/mod.ts";
*
* const suite = new CipherSuite({
* kem: new DhkemSecp256k1HkdfSha256(),
* kdf: KdfId.HkdfSha256,
* aead: AeadId.Aes128Gcm,
* });
* ```
*
* When using `hpke-js` (`https://deno.land/x/hpke/mod.ts`), `KemId.DhkemSecp256k1HkdfSha256`
* cannot be used as well. So you need to specify the instance of this class as follows:
*
* @example Use with `@hpke/core` (`https://deno.land/x/hpke/core/mod.ts`).
* @example Use with `@hpke/core`:
*
* ```ts
* import {
* Aes128Gcm,
* CipherSuite,
* HkdfSha256,
* } from "https://deno.land/x/hpke/core/mod.ts";
* import { DhkemSecp256k1HkdfSha256 } from "https://deno.land/x/hpke/x/dhkem-secp256k1/mod.ts";
* } from "@hpke/core";
* import { DhkemSecp256k1HkdfSha256 } from "@hpke/dhkem-secp256k1";
*
* const suite = new CipherSuite({
* kem: new DhkemSecp256k1HkdfSha256(),
Expand Down
23 changes: 4 additions & 19 deletions packages/dhkem-x25519/src/dhkemX25519.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,24 @@ import { X25519 } from "./x25519.ts";
* {@link https://github.com/paulmillr/noble-curves | @noble/curves}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example Use with `@hpke/core` (`https://deno.land/x/hpke/core/mod.ts`).
* @example Use with `@hpke/core`:
*
* ```ts
* import {
* Aes128Gcm,
* CipherSuite,
* HkdfSha256,
* } from "https://deno.land/x/hpke/core/mod.ts";
* import { DhkemX25519HkdfSha256 } from "https://deno.land/x/hpke/x/dhkem-x25519/mod.ts";
* } from "@hpke/core";
* import { DhkemX25519HkdfSha256 } from "@hpke/dhkem-x25519";
*
* const suite = new CipherSuite({
* kem: new DhkemX25519HkdfSha256(),
* kdf: new HkdfSha256(),
* aead: new Aes128Gcm(),
* });
* ```
*
* When using `hpke-js` (`https://deno.land/x/hpke/mod.ts`), `KemId.DhkemX25519HkdfSha256`
* can be used. You don't need to use this class.
*
* @example
*
* ```ts
* import { AeadId, CipherSuite, KdfId, KemId } from "https://deno.land/x/hpke/mod.ts";
*
* const suite = new CipherSuite({
* kem: KemId.DhkemX25519HkdfSha256,
* kdf: KdfId.HkdfSha256,
* aead: AeadId.Aes128Gcm,
* });
* ```
*/
export class DhkemX25519HkdfSha256 extends Dhkem {
/** KemId.DhkemX25519HkdfSha256 (0x0020) */
Expand Down
21 changes: 4 additions & 17 deletions packages/dhkem-x448/src/dhkemX448.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,17 @@ import { X448 } from "./x448.ts";
* {@link https://github.com/paulmillr/noble-curves | @noble/curves}.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example Use with `hpke-js` (`https://deno.land/x/hpke/mod.ts`).
*
* ```ts
* import { CipherSuite, AeadId, KdfId } from "https://deno.land/x/hpke/mod.ts";
* import { DhkemX448HkdfSha512 } from "https://deno.land/x/hpke/x/dhkem-x448/mod.ts";
*
* const suite = new CipherSuite({
* kem: new DhkemX448HkdfSha512(),
* kdf: KdfId.HkdfSha512,
* aead: AeadId.Aes256Gcm,
* });
* ```
*
* @example Use with `@hpke/core` (`https://deno.land/x/hpke/core/mod.ts`).
* @example Use with `@hpke/core`:
*
* ```ts
* import {
* Aes256Gcm,
* CipherSuite,
* HkdfSha512,
* } from "https://deno.land/x/hpke/core/mod.ts";
* import { DhkemX448HkdfSha512 } from "https://deno.land/x/hpke/x/dhkem-x448/mod.ts";
* } from "@hpke/core";
* import { DhkemX448HkdfSha512 } from "@hpke/dhkem-x448";
*
* const suite = new CipherSuite({
* kem: new DhkemX448HkdfSha512(),
Expand Down
14 changes: 7 additions & 7 deletions packages/hpke-js/src/cipherSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import { DhkemP521HkdfSha512 } from "./kems/dhkemP521.ts";
* which supports all of the ciphersuites defined in
* {@link https://datatracker.ietf.org/doc/html/rfc9180 | RFC9180}.
*
* The class consists of the {@link https://deno.land/x/hpke/core/mod.ts | @hpke/core},
* {@link https://deno.land/x/hpke/x/chacha20Poly1305/mod.ts | @hpke/chcha20poly1305},
* {@link https://deno.land/x/hpke/x/dhkem-x25519/mod.ts | @hpke/dhkem-x25519} and
* {@link https://deno.land/x/hpke/x/dhkem-x448/mod.ts | @hpke/dhkem-x448} internally.
* The class consists of the {@link https://jsr.io/@hpke/core/doc | @hpke/core},
* {@link https://jsr.io/@hpke/chacha20Poly1305/doc | @hpke/chcha20poly1305},
* {@link https://jsr.io/@hpke/dhkem-x25519/doc | @hpke/dhkem-x25519} and
* {@link https://jsr.io/@hpke/dhkem-x448/doc | @hpke/dhkem-x448} internally.
*
* This class provides following functions:
*
Expand All @@ -48,7 +48,7 @@ import { DhkemP521HkdfSha512 } from "./kems/dhkemP521.ts";
* @example Use only ciphersuites supported internally.
*
* ```ts
* import { AeadId, CipherSuite, KdfId, KemId } from "http://deno.land/x/hpke/mod.ts";
* import { AeadId, CipherSuite, KdfId, KemId } from "@hpke/hpke-js";
*
* const suite = new CipherSuite({
* kem: KemId.DhkemP256HkdfSha256,
Expand All @@ -60,11 +60,11 @@ import { DhkemP521HkdfSha512 } from "./kems/dhkemP521.ts";
* @example Use a ciphersuite consisting of an external module.
*
* ```ts
* import { AeadId, CipherSuite, KdfId } from "http://deno.land/x/hpke/mod.ts";
* import { AeadId, CipherSuite, KdfId } from "@hpke/hpke-js";
* // Use an extension module.
* import {
* HybridkemX25519Kyber768,
* } from "https://deno.land/x/hpke/x/hybridkem-x25519-kyber768/mod.ts";
* } from "@hpke/hybridkem-x25519-kyber768";
*
* const suite = new CipherSuite({
* kem: new HybridkemX25519Kyber768(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class DhkemX25519HkdfSha256 extends Dhkem implements DhkemInterface {
* {@link https://github.com/Argyle-Software/kyber | pqc-kyber }.
*
* The instance of this class can be specified to the
* {@link https://deno.land/x/hpke/core/mod.ts?s=CipherSuiteParams | CipherSuiteParams} as follows:
* {@link https://jsr.io/@hpke/core/doc/~/CipherSuiteParams | CipherSuiteParams} as follows:
*
* @example
* @example Use with `@hpke/core`:
*
* ```ts
* import { Aes128Gcm, CipherSuite, HkdfSha256 } from "http://deno.land/x/hpke/core/mod.ts";
* import { HybridkemX25519Kyber768 } from "https://deno.land/x/hpke/x/hybridkem-x25519-kyber768/mod.ts";
* import { Aes128Gcm, CipherSuite, HkdfSha256 } from "@hpke/core";
* import { HybridkemX25519Kyber768 } from "@hpke/hybridkem-x25519-kyber768";
* const suite = new CipherSuite({
* kem: new HybridkemX25519Kyber768(),
* kdf: new HkdfSha256(),
Expand Down
Loading