From c1f46a0880e904e5460e9d5f6c2e8a60b8003870 Mon Sep 17 00:00:00 2001 From: dajiaji Date: Sun, 26 Nov 2023 00:47:59 +0000 Subject: [PATCH] deploy: 9781a02160880dc7d0683d339f6d0342d0a21948 --- docs/main/classes/Kyber1024.html | 12 ++++++------ docs/main/classes/Kyber512.html | 12 ++++++------ docs/main/classes/Kyber768.html | 12 ++++++------ docs/main/classes/KyberError.html | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/main/classes/Kyber1024.html b/docs/main/classes/Kyber1024.html index b4ca8b5..b7f9b87 100644 --- a/docs/main/classes/Kyber1024.html +++ b/docs/main/classes/Kyber1024.html @@ -1,7 +1,7 @@ Kyber1024 | API reference for crystals-kyber-js/main

The Kyber1024 implementation.

Example

// import { Kyber1024 } from "crystals-kyber-js"; // Node.js
import { Kyber1024 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

const recipient = new Kyber1024();
const [pkR, skR] = await recipient.generateKeyPair();

const sender = new Kyber1024();
const [ct, ssS] = await sender.encap(pkR);

const ssR = await recipient.decap(ct, skR);
// ssS === ssR
-

Hierarchy

  • KyberBase
    • Kyber1024

Constructors

Hierarchy

  • KyberBase
    • Kyber1024

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 11
_dv: number = 5
_eta1: number = 2
_eta2: number = 2
_k: number = 4
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    +

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 11
_dv: number = 5
_eta1: number = 2
_eta2: number = 2
_k: number = 4
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    If an error occurred, throws KyberError.

    Parameters

    • ct: Uint8Array

      A ciphertext generated by encap.

    • sk: Uint8Array

      A private key.

      @@ -30,7 +30,7 @@

      Example

      The Kyber768 decapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ssS] = await kyber.encap(pk);
      const ssR = await kyber.decap(ct, sk);
      // ssS === ssR
      -
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    +
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    If an error occurred, throws KyberError.

    Parameters

    • seed: Uint8Array

      A 64-octet seed for the deterministic key generation.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    @@ -38,7 +38,7 @@

    Example

    The Kyber768Example

    Derives a Kyber768 keypair deterministically.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const seed = new Uint8Array(64);
    globalThis.crypto.getRandomValues(seed);
    const [pk, sk] = await kyber.deriveKeyPair(seed);
    -
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    +
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    If an error occurred, throws KyberError.

    Parameters

    • pk: Uint8Array

      A public key.

    • Optional seed: Uint8Array

      An optional 32-octet seed for the deterministic shared secret generation.

      @@ -47,11 +47,11 @@

      Example

      Derives a Kybe

      Example

      The Kyber768 encapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ss] = await kyber.encap(pk);
      -
  • Generates a keypair [publicKey, privateKey].

    +
  • Generates a keypair [publicKey, privateKey].

    If an error occurred, throws KyberError.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    Throws

    KyberError

    Example

    Generates a Kyber768 keypair.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const [pk, sk] = await kyber.generateKeyPair();
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/main/classes/Kyber512.html b/docs/main/classes/Kyber512.html index a418be6..f4cb525 100644 --- a/docs/main/classes/Kyber512.html +++ b/docs/main/classes/Kyber512.html @@ -1,7 +1,7 @@ Kyber512 | API reference for crystals-kyber-js/main

The Kyber512 implementation.

Example

// import { Kyber512 } from "crystals-kyber-js"; // Node.js
import { Kyber512 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

const recipient = new Kyber512();
const [pkR, skR] = await recipient.generateKeyPair();

const sender = new Kyber512();
const [ct, ssS] = await sender.encap(pkR);

const ssR = await recipient.decap(ct, skR);
// ssS === ssR
-

Hierarchy

  • KyberBase
    • Kyber512

Constructors

Hierarchy

  • KyberBase
    • Kyber512

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 10
_dv: number = 4
_eta1: number = 3
_eta2: number = 2
_k: number = 2
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    +

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 10
_dv: number = 4
_eta1: number = 3
_eta2: number = 2
_k: number = 2
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    If an error occurred, throws KyberError.

    Parameters

    • ct: Uint8Array

      A ciphertext generated by encap.

    • sk: Uint8Array

      A private key.

      @@ -30,7 +30,7 @@

      Example

      The Kyber768 decapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ssS] = await kyber.encap(pk);
      const ssR = await kyber.decap(ct, sk);
      // ssS === ssR
      -
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    +
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    If an error occurred, throws KyberError.

    Parameters

    • seed: Uint8Array

      A 64-octet seed for the deterministic key generation.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    @@ -38,7 +38,7 @@

    Example

    The Kyber768Example

    Derives a Kyber768 keypair deterministically.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const seed = new Uint8Array(64);
    globalThis.crypto.getRandomValues(seed);
    const [pk, sk] = await kyber.deriveKeyPair(seed);
    -
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    +
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    If an error occurred, throws KyberError.

    Parameters

    • pk: Uint8Array

      A public key.

    • Optional seed: Uint8Array

      An optional 32-octet seed for the deterministic shared secret generation.

      @@ -47,11 +47,11 @@

      Example

      Derives a Kybe

      Example

      The Kyber768 encapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ss] = await kyber.encap(pk);
      -
  • Generates a keypair [publicKey, privateKey].

    +
  • Generates a keypair [publicKey, privateKey].

    If an error occurred, throws KyberError.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    Throws

    KyberError

    Example

    Generates a Kyber768 keypair.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const [pk, sk] = await kyber.generateKeyPair();
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/main/classes/Kyber768.html b/docs/main/classes/Kyber768.html index 3c034fd..4334cdc 100644 --- a/docs/main/classes/Kyber768.html +++ b/docs/main/classes/Kyber768.html @@ -1,7 +1,7 @@ Kyber768 | API reference for crystals-kyber-js/main

The Kyber768 implementation.

Example

// import { Kyber768 } from "crystals-kyber-js"; // Node.js
import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

const recipient = new Kyber768();
const [pkR, skR] = await recipient.generateKeyPair();

const sender = new Kyber768();
const [ct, ssS] = await sender.encap(pkR);

const ssR = await recipient.decap(ct, skR);
// ssS === ssR
-

Hierarchy

  • KyberBase
    • Kyber768

Constructors

Hierarchy

  • KyberBase
    • Kyber768

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 10
_dv: number = 4
_eta1: number = 2
_eta2: number = 2
_k: number = 3
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    +

Constructors

Properties

_compressedUSize: number = 0
_compressedVSize: number = 0
_du: number = 10
_dv: number = 4
_eta1: number = 2
_eta2: number = 2
_k: number = 3
_pkSize: number = 0
_skSize: number = 0

Methods

  • Parameters

    • r: Uint8Array
    • u: number[][]

    Returns Uint8Array

  • Parameters

    • r: Uint8Array
    • v: number[]

    Returns Uint8Array

  • Parameters

    • a: Uint8Array

    Returns number[][]

  • Parameters

    • a: Uint8Array

    Returns number[]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Parameters

    • sigma: Uint8Array
    • offset: number
    • size: number

    Returns number[][]

  • Generates a ciphertext for the public key and a shared secret.

    If an error occurred, throws KyberError.

    Parameters

    • ct: Uint8Array

      A ciphertext generated by encap.

    • sk: Uint8Array

      A private key.

      @@ -30,7 +30,7 @@

      Example

      The Kyber768 decapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ssS] = await kyber.encap(pk);
      const ssR = await kyber.decap(ct, sk);
      // ssS === ssR
      -
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    +
  • Derives a keypair [publicKey, privateKey] deterministically from a 64-octet seed.

    If an error occurred, throws KyberError.

    Parameters

    • seed: Uint8Array

      A 64-octet seed for the deterministic key generation.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    @@ -38,7 +38,7 @@

    Example

    The Kyber768Example

    Derives a Kyber768 keypair deterministically.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const seed = new Uint8Array(64);
    globalThis.crypto.getRandomValues(seed);
    const [pk, sk] = await kyber.deriveKeyPair(seed);
    -
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    +
  • Generates a shared secret from the encapsulated ciphertext and the private key.

    If an error occurred, throws KyberError.

    Parameters

    • pk: Uint8Array

      A public key.

    • Optional seed: Uint8Array

      An optional 32-octet seed for the deterministic shared secret generation.

      @@ -47,11 +47,11 @@

      Example

      Derives a Kybe

      Example

      The Kyber768 encapsulation.

      // import { Kyber768 } from "crystals-kyber-js"; // Node.js
      import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

      const kyber = new Kyber768();
      const [pk, sk] = await kyber.generateKeyPair();
      const [ct, ss] = await kyber.encap(pk);
      -
  • Generates a keypair [publicKey, privateKey].

    +
  • Generates a keypair [publicKey, privateKey].

    If an error occurred, throws KyberError.

    Returns Promise<[Uint8Array, Uint8Array]>

    A kaypair [publicKey, privateKey].

    Throws

    KyberError

    Example

    Generates a Kyber768 keypair.

    // import { Kyber768 } from "crystals-kyber-js"; // Node.js
    import { Kyber768 } from "http://deno.land/x/crystals_kyber/mod.ts"; // Deno

    const kyber = new Kyber768();
    const [pk, sk] = await kyber.generateKeyPair();
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/main/classes/KyberError.html b/docs/main/classes/KyberError.html index 85bc543..744bf63 100644 --- a/docs/main/classes/KyberError.html +++ b/docs/main/classes/KyberError.html @@ -1,7 +1,7 @@ KyberError | API reference for crystals-kyber-js/main

The base error class of kyber-ts.

-

Hierarchy

  • Error
    • KyberError

Constructors

Hierarchy

  • Error
    • KyberError

Constructors

Properties

Constructors

Properties

cause?: unknown
message: string
name: string
stack?: string

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

cause?: unknown
message: string
name: string
stack?: string

Generated using TypeDoc

\ No newline at end of file