From f016f8d75d53b2071676b022a251af757d156d5d Mon Sep 17 00:00:00 2001 From: dajiaji Date: Sun, 26 Nov 2023 05:37:21 +0000 Subject: [PATCH] deploy: 4feb7ca64dff417645164ebefc545979e323dd4a --- .../docs/classes/Chacha20Poly1305.html | 10 +++---- core/docs/classes/Aes128Gcm.html | 12 ++++---- core/docs/classes/Aes256Gcm.html | 12 ++++---- core/docs/classes/BaseError.html | 4 +-- core/docs/classes/CipherSuite.html | 18 +++++------ core/docs/classes/DecapError.html | 4 +-- core/docs/classes/DeriveKeyPairError.html | 4 +-- core/docs/classes/DeserializeError.html | 4 +-- core/docs/classes/DhkemP256HkdfSha256.html | 4 +-- core/docs/classes/DhkemP384HkdfSha384.html | 4 +-- core/docs/classes/DhkemP521HkdfSha512.html | 4 +-- core/docs/classes/EncapError.html | 4 +-- core/docs/classes/ExportError.html | 4 +-- core/docs/classes/ExportOnly.html | 12 ++++---- core/docs/classes/HkdfSha256.html | 10 +++---- core/docs/classes/HkdfSha384.html | 10 +++---- core/docs/classes/HkdfSha512.html | 10 +++---- core/docs/classes/HpkeError.html | 4 +-- core/docs/classes/InvalidParamError.html | 4 +-- .../classes/MessageLimitReachedError.html | 4 +-- core/docs/classes/NotSupportedError.html | 4 +-- core/docs/classes/OpenError.html | 4 +-- core/docs/classes/SealError.html | 4 +-- core/docs/classes/SerializeError.html | 4 +-- core/docs/classes/ValidationError.html | 4 +-- .../interfaces/AeadEncryptionContext.html | 6 ++-- core/docs/interfaces/AeadInterface.html | 12 ++++---- core/docs/interfaces/CipherSuiteParams.html | 8 ++--- .../interfaces/CipherSuiteSealResponse.html | 6 ++-- core/docs/interfaces/EncryptionContext.html | 8 ++--- core/docs/interfaces/KdfInterface.html | 22 +++++++------- core/docs/interfaces/KemInterface.html | 30 +++++++++---------- core/docs/interfaces/PreSharedKey.html | 6 ++-- .../interfaces/RecipientContextParams.html | 12 ++++---- core/docs/interfaces/SenderContext.html | 10 +++---- core/docs/interfaces/SenderContextParams.html | 12 ++++---- core/docs/types/AeadId.html | 2 +- core/docs/types/KdfId.html | 2 +- core/docs/types/KemId.html | 2 +- core/docs/types/RecipientContext.html | 2 +- core/docs/variables/AeadId-1.html | 2 +- core/docs/variables/KdfId-1.html | 2 +- core/docs/variables/KemId-1.html | 2 +- .../classes/DhkemSecp256k1HkdfSha256.html | 14 ++++----- .../docs/classes/DhkemX25519HkdfSha256.html | 14 ++++----- .../docs/classes/DhkemX448HkdfSha512.html | 14 ++++----- docs/classes/BaseError.html | 4 +-- docs/classes/CipherSuite.html | 24 +++++++-------- docs/classes/DecapError.html | 4 +-- docs/classes/DeriveKeyPairError.html | 4 +-- docs/classes/DeserializeError.html | 4 +-- docs/classes/EncapError.html | 4 +-- docs/classes/ExportError.html | 4 +-- docs/classes/HpkeError.html | 4 +-- docs/classes/InvalidParamError.html | 4 +-- docs/classes/MessageLimitReachedError.html | 4 +-- docs/classes/NotSupportedError.html | 4 +-- docs/classes/OpenError.html | 4 +-- docs/classes/SealError.html | 4 +-- docs/classes/SerializeError.html | 4 +-- docs/classes/ValidationError.html | 4 +-- docs/interfaces/AeadEncryptionContext.html | 6 ++-- docs/interfaces/AeadInterface.html | 12 ++++---- docs/interfaces/CipherSuiteParams.html | 8 ++--- docs/interfaces/CipherSuiteSealResponse.html | 6 ++-- docs/interfaces/EncryptionContext.html | 8 ++--- docs/interfaces/KdfInterface.html | 22 +++++++------- docs/interfaces/KemInterface.html | 30 +++++++++---------- docs/interfaces/PreSharedKey.html | 6 ++-- docs/interfaces/RecipientContextParams.html | 12 ++++---- docs/interfaces/SenderContext.html | 10 +++---- docs/interfaces/SenderContextParams.html | 12 ++++---- docs/types/Aead.html | 2 +- docs/types/AeadId.html | 2 +- docs/types/Kdf.html | 2 +- docs/types/KdfId.html | 2 +- docs/types/Kem.html | 2 +- docs/types/KemId.html | 2 +- docs/types/RecipientContext.html | 2 +- docs/variables/Aead-1.html | 2 +- docs/variables/AeadId-1.html | 2 +- docs/variables/Kdf-1.html | 2 +- docs/variables/KdfId-1.html | 2 +- docs/variables/Kem-1.html | 2 +- docs/variables/KemId-1.html | 2 +- .../docs/classes/HybridkemX25519Kyber768.html | 4 +-- 86 files changed, 296 insertions(+), 296 deletions(-) diff --git a/chacha20poly1305/docs/classes/Chacha20Poly1305.html b/chacha20poly1305/docs/classes/Chacha20Poly1305.html index dcc02f6d5..180ddab94 100644 --- a/chacha20poly1305/docs/classes/Chacha20Poly1305.html +++ b/chacha20poly1305/docs/classes/Chacha20Poly1305.html @@ -6,14 +6,14 @@

This class is implemented using @noble/ciphers.

-

Hierarchy

Implements

Constructors

Hierarchy

  • Chacha20Poly1305

Implements

  • AeadInterface

Constructors

Properties

id: AeadId = AeadId.Chacha20Poly1305

AeadId.Chacha20Poly1305 (0x0003)

-
keySize: number = 32

32

-
nonceSize: number = 12

12

-
tagSize: number = 16

16

-

Methods

  • Parameters

    • key: ArrayBuffer

    Returns AeadEncryptionContext

Generated using TypeDoc

\ No newline at end of file +
keySize: number = 32

32

+
nonceSize: number = 12

12

+
tagSize: number = 16

16

+

Methods

  • Parameters

    • key: ArrayBuffer

    Returns AeadEncryptionContext

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/Aes128Gcm.html b/core/docs/classes/Aes128Gcm.html index 38446295d..cfa893480 100644 --- a/core/docs/classes/Aes128Gcm.html +++ b/core/docs/classes/Aes128Gcm.html @@ -3,17 +3,17 @@ to the aead parameter of CipherSuiteParams instead of AeadId.Aes128Gcm.

Example

import {
Aes128Gcm,
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Implements

Constructors

Hierarchy

Implements

Constructors

Properties

id: AeadId = AeadId.Aes128Gcm

AeadId.Aes128Gcm (0x0001)

-
keySize: number = 16

16

-
nonceSize: number = 12

12

-
tagSize: number = 16

16

-

Methods

keySize: number = 16

16

+
nonceSize: number = 12

12

+
tagSize: number = 16

16

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/Aes256Gcm.html b/core/docs/classes/Aes256Gcm.html index 0bb1eacb9..89265c887 100644 --- a/core/docs/classes/Aes256Gcm.html +++ b/core/docs/classes/Aes256Gcm.html @@ -4,17 +4,17 @@ as follows:

Example

import {
Aes256Gcm,
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes256Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

id: AeadId = AeadId.Aes256Gcm

AeadId.Aes256Gcm (0x0002)

-
keySize: number = 32

32

-
nonceSize: number = 12

12

-
tagSize: number = 16

16

-

Methods

keySize: number = 32

32

+
nonceSize: number = 12

12

+
tagSize: number = 16

16

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/BaseError.html b/core/docs/classes/BaseError.html index 8a6a40eb5..575bdd2eb 100644 --- a/core/docs/classes/BaseError.html +++ b/core/docs/classes/BaseError.html @@ -1,7 +1,7 @@ BaseError | @hpke/core

Class BaseError

The base error class of hpke-js.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/CipherSuite.html b/core/docs/classes/CipherSuite.html index b40009116..78284cbde 100644 --- a/core/docs/classes/CipherSuite.html +++ b/core/docs/classes/CipherSuite.html @@ -37,7 +37,7 @@

Example

Use a ciphersuite which is currently not supported by Web Cryptography API.

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";
const suite = new CipherSuite({
kem: new DhkemX25519HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • CipherSuiteNative
    • CipherSuite

Constructors

Properties

Accessors

aead @@ -51,32 +51,32 @@

Example

Use a ciphersuite which is currently not supported by Web Cry

Constructors

Properties

_api: SubtleCrypto = undefined

Accessors

Methods

  • Returns Promise<void>

Properties

_api: SubtleCrypto = undefined

Accessors

Methods

  • Returns Promise<void>

  • Decrypts a message from a sender.

    +
  • Decrypts a message from a sender.

    If the error occurred, throws DecapError | DeserializeError | OpenError | ValidationError.

    Parameters

    • params: RecipientContextParams

      A set of parameters for building a recipient encryption context.

    • ct: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • aad: ArrayBuffer = EMPTY

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/DecapError.html b/core/docs/classes/DecapError.html index 19580c6a3..7fc70db49 100644 --- a/core/docs/classes/DecapError.html +++ b/core/docs/classes/DecapError.html @@ -1,7 +1,7 @@ DecapError | @hpke/core

Class DecapError

decap() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/DeriveKeyPairError.html b/core/docs/classes/DeriveKeyPairError.html index 52e850d46..98a44738f 100644 --- a/core/docs/classes/DeriveKeyPairError.html +++ b/core/docs/classes/DeriveKeyPairError.html @@ -1,7 +1,7 @@ DeriveKeyPairError | @hpke/core

Class DeriveKeyPairError

Key pair derivation failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/DeserializeError.html b/core/docs/classes/DeserializeError.html index ba3830965..b8b5954cf 100644 --- a/core/docs/classes/DeserializeError.html +++ b/core/docs/classes/DeserializeError.html @@ -1,7 +1,7 @@ DeserializeError | @hpke/core

Class DeserializeError

Public or private key deserialization failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/DhkemP256HkdfSha256.html b/core/docs/classes/DhkemP256HkdfSha256.html index 0babda421..ce3e6b58d 100644 --- a/core/docs/classes/DhkemP256HkdfSha256.html +++ b/core/docs/classes/DhkemP256HkdfSha256.html @@ -4,7 +4,7 @@ as follows:

Example

import {
Aes128Gcm,
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • DhkemP256HkdfSha256Native
    • DhkemP256HkdfSha256

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 65
id: KemId = KemId.DhkemP256HkdfSha256
privateKeySize: number = 32
publicKeySize: number = 65
secretSize: number = 32

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 65
id: KemId = KemId.DhkemP256HkdfSha256
privateKeySize: number = 32
publicKeySize: number = 65
secretSize: number = 32

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/DhkemP384HkdfSha384.html b/core/docs/classes/DhkemP384HkdfSha384.html index c4c1d578c..7a059cf57 100644 --- a/core/docs/classes/DhkemP384HkdfSha384.html +++ b/core/docs/classes/DhkemP384HkdfSha384.html @@ -4,7 +4,7 @@ as follows:

Example

import {
Aes128Gcm,
CipherSuite,
DhkemP384HkdfSha384,
HkdfSha384,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP384HkdfSha384(),
kdf: new HkdfSha384(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • DhkemP384HkdfSha384Native
    • DhkemP384HkdfSha384

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 97
id: KemId = KemId.DhkemP384HkdfSha384
privateKeySize: number = 48
publicKeySize: number = 97
secretSize: number = 48

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 97
id: KemId = KemId.DhkemP384HkdfSha384
privateKeySize: number = 48
publicKeySize: number = 97
secretSize: number = 48

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/DhkemP521HkdfSha512.html b/core/docs/classes/DhkemP521HkdfSha512.html index 42352a1c5..7e92cb253 100644 --- a/core/docs/classes/DhkemP521HkdfSha512.html +++ b/core/docs/classes/DhkemP521HkdfSha512.html @@ -4,7 +4,7 @@ as follows:

Example

import {
Aes256Gcm,
CipherSuite,
DhkemP521HkdfSha512,
HkdfSha512,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP521HkdfSha512(),
kdf: new HkdfSha512(),
aead: new Aes256Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • DhkemP521HkdfSha512Native
    • DhkemP521HkdfSha512

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 133
id: KemId = KemId.DhkemP521HkdfSha512
privateKeySize: number = 64
publicKeySize: number = 133
secretSize: number = 64

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_prim: DhkemPrimitives
encSize: number = 133
id: KemId = KemId.DhkemP521HkdfSha512
privateKeySize: number = 64
publicKeySize: number = 133
secretSize: number = 64

Methods

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/EncapError.html b/core/docs/classes/EncapError.html index b6aab2728..f91f392dd 100644 --- a/core/docs/classes/EncapError.html +++ b/core/docs/classes/EncapError.html @@ -1,7 +1,7 @@ EncapError | @hpke/core

Class EncapError

encap() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/ExportError.html b/core/docs/classes/ExportError.html index a64f0bf2d..5dc0e943c 100644 --- a/core/docs/classes/ExportError.html +++ b/core/docs/classes/ExportError.html @@ -1,7 +1,7 @@ ExportError | @hpke/core

Class ExportError

Secret export failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/ExportOnly.html b/core/docs/classes/ExportOnly.html index f18180b20..db987a198 100644 --- a/core/docs/classes/ExportOnly.html +++ b/core/docs/classes/ExportOnly.html @@ -4,17 +4,17 @@ as follows:

Example

import {
CipherSuite,
DhkemP256HkdfSha256,
ExportOnly,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new ExportOnly(),
});
-

Hierarchy

Implements

Constructors

Hierarchy

  • ExportOnly

Implements

Constructors

Properties

id: AeadId = AeadId.ExportOnly

The KDF identifier.

-
keySize: number = 0

The length in bytes of an AEAD key (Nk).

-
nonceSize: number = 0

The length in bytes of an AEAD nonce (Nn).

-
tagSize: number = 0

The length in bytes of an AEAD authentication tag (Nt).

-

Methods

keySize: number = 0

The length in bytes of an AEAD key (Nk).

+
nonceSize: number = 0

The length in bytes of an AEAD nonce (Nn).

+
tagSize: number = 0

The length in bytes of an AEAD authentication tag (Nt).

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/HkdfSha256.html b/core/docs/classes/HkdfSha256.html index 6f1a2e98a..7ce418d7f 100644 --- a/core/docs/classes/HkdfSha256.html +++ b/core/docs/classes/HkdfSha256.html @@ -6,7 +6,7 @@ please use hpke-js#CipherSuite.

Example

import {
Aes128Gcm,
CipherSuite,
DhkemP256HkdfSha256,
HkdfSha256,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP256HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • HkdfSha256Native
    • HkdfSha256

Constructors

Properties

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

-
hashSize: number = 32

32

-
id: KdfId = KdfId.HkdfSha256

KdfId.HkdfSha256 (0x0001)

-

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

+
hashSize: number = 32

32

+
id: KdfId = KdfId.HkdfSha256

KdfId.HkdfSha256 (0x0001)

+

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/HkdfSha384.html b/core/docs/classes/HkdfSha384.html index 7921db5e2..8bd0ff824 100644 --- a/core/docs/classes/HkdfSha384.html +++ b/core/docs/classes/HkdfSha384.html @@ -6,7 +6,7 @@ please use hpke-js#CipherSuite.

Example

import {
Aes128Gcm,
CipherSuite,
DhkemP384HkdfSha384,
HkdfSha384,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP384HkdfSha384(),
kdf: new HkdfSha384(),
aead: new Aes128Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • HkdfSha384Native
    • HkdfSha384

Constructors

Properties

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

-
hashSize: number = 48

48

-
id: KdfId = KdfId.HkdfSha384

KdfId.HkdfSha384 (0x0002)

-

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

+
hashSize: number = 48

48

+
id: KdfId = KdfId.HkdfSha384

KdfId.HkdfSha384 (0x0002)

+

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/HkdfSha512.html b/core/docs/classes/HkdfSha512.html index 538074835..281b43081 100644 --- a/core/docs/classes/HkdfSha512.html +++ b/core/docs/classes/HkdfSha512.html @@ -6,7 +6,7 @@ please use hpke-js#CipherSuite.

Example

import {
Aes256Gcm,
CipherSuite,
DhkemP521HkdfSha512,
HkdfSha512,
} from "http://deno.land/x/hpke/core/mod.ts";

const suite = new CipherSuite({
kem: new DhkemP521HkdfSha512(),
kdf: new HkdfSha512(),
aead: new Aes256Gcm(),
});
-

Hierarchy

Constructors

Hierarchy

  • HkdfSha512Native
    • HkdfSha512

Constructors

Properties

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

-
hashSize: number = 64

64

-
id: KdfId = KdfId.HkdfSha512

KdfId.HkdfSha512 (0x0003)

-

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_api: SubtleCrypto = undefined
_suiteId: Uint8Array = EMPTY
algHash: HmacKeyGenParams = ...

The parameters for Web Cryptography API

+
hashSize: number = 64

64

+
id: KdfId = KdfId.HkdfSha512

KdfId.HkdfSha512 (0x0003)

+

Methods

  • Returns Promise<void>

  • Parameters

    • label: Uint8Array
    • ikm: Uint8Array

    Returns Uint8Array

  • Parameters

    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Uint8Array

  • Parameters

    • prk: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • ikm: ArrayBuffer
    • info: ArrayBuffer
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • suiteId: Uint8Array

    Returns void

  • Parameters

    • prk: ArrayBuffer
    • label: Uint8Array
    • info: Uint8Array
    • len: number

    Returns Promise<ArrayBuffer>

  • Parameters

    • salt: ArrayBuffer
    • label: Uint8Array
    • ikm: Uint8Array

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/classes/HpkeError.html b/core/docs/classes/HpkeError.html index b65b01a79..5359dfb1d 100644 --- a/core/docs/classes/HpkeError.html +++ b/core/docs/classes/HpkeError.html @@ -1,7 +1,7 @@ HpkeError | @hpke/core

Class HpkeError

The base error class of hpke-js.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/InvalidParamError.html b/core/docs/classes/InvalidParamError.html index 3d950858b..6bfea5db9 100644 --- a/core/docs/classes/InvalidParamError.html +++ b/core/docs/classes/InvalidParamError.html @@ -1,7 +1,7 @@ InvalidParamError | @hpke/core

Class InvalidParamError

Invalid parameter.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/MessageLimitReachedError.html b/core/docs/classes/MessageLimitReachedError.html index 7edec82fe..84ccb8e73 100644 --- a/core/docs/classes/MessageLimitReachedError.html +++ b/core/docs/classes/MessageLimitReachedError.html @@ -1,7 +1,7 @@ MessageLimitReachedError | @hpke/core

Class MessageLimitReachedError

Sequence number overflow on the encryption context.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/NotSupportedError.html b/core/docs/classes/NotSupportedError.html index 9fa3a6e54..eaa686ecb 100644 --- a/core/docs/classes/NotSupportedError.html +++ b/core/docs/classes/NotSupportedError.html @@ -1,7 +1,7 @@ NotSupportedError | @hpke/core

Class NotSupportedError

Not supported failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/OpenError.html b/core/docs/classes/OpenError.html index c822a19fa..a469bcec5 100644 --- a/core/docs/classes/OpenError.html +++ b/core/docs/classes/OpenError.html @@ -1,7 +1,7 @@ OpenError | @hpke/core

Class OpenError

open() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/SealError.html b/core/docs/classes/SealError.html index 446af459f..cdfb08881 100644 --- a/core/docs/classes/SealError.html +++ b/core/docs/classes/SealError.html @@ -1,7 +1,7 @@ SealError | @hpke/core

Class SealError

seal() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/SerializeError.html b/core/docs/classes/SerializeError.html index c8ad5005a..cc843260b 100644 --- a/core/docs/classes/SerializeError.html +++ b/core/docs/classes/SerializeError.html @@ -1,7 +1,7 @@ SerializeError | @hpke/core

Class SerializeError

Public or private key serialization failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/classes/ValidationError.html b/core/docs/classes/ValidationError.html index 6d3e69e3b..b9209c549 100644 --- a/core/docs/classes/ValidationError.html +++ b/core/docs/classes/ValidationError.html @@ -1,7 +1,7 @@ ValidationError | @hpke/core

Class ValidationError

KEM input or output validation failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/core/docs/interfaces/AeadEncryptionContext.html b/core/docs/interfaces/AeadEncryptionContext.html index 137e9c2e6..ff36b1834 100644 --- a/core/docs/interfaces/AeadEncryptionContext.html +++ b/core/docs/interfaces/AeadEncryptionContext.html @@ -1,14 +1,14 @@ AeadEncryptionContext | @hpke/core

Interface AeadEncryptionContext

The AEAD encryption context interface.

-

Hierarchy

  • AeadEncryptionContext

Methods

Hierarchy

  • AeadEncryptionContext

Methods

Methods

  • Decrypts data with an initialization vector and additional authenticated data.

    Parameters

    • iv: ArrayBuffer

      An initialization vector.

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    -
  • Encrypts data with an initialization vector and additional authenticated data.

    Parameters

    • iv: ArrayBuffer

      An initialization vector.

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A cipher text as bytes.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/AeadInterface.html b/core/docs/interfaces/AeadInterface.html index 25f8bbfc4..a39251fc8 100644 --- a/core/docs/interfaces/AeadInterface.html +++ b/core/docs/interfaces/AeadInterface.html @@ -1,14 +1,14 @@ AeadInterface | @hpke/core

Interface AeadInterface

The AEAD interface.

-

Hierarchy

  • AeadInterface

Implemented by

Properties

id +

Hierarchy

  • AeadInterface

Implemented by

Properties

id: AeadId

The KDF identifier.

-
keySize: number

The length in bytes of an AEAD key (Nk).

-
nonceSize: number

The length in bytes of an AEAD nonce (Nn).

-
tagSize: number

The length in bytes of an AEAD authentication tag (Nt).

-

Methods

keySize: number

The length in bytes of an AEAD key (Nk).

+
nonceSize: number

The length in bytes of an AEAD nonce (Nn).

+
tagSize: number

The length in bytes of an AEAD authentication tag (Nt).

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/CipherSuiteParams.html b/core/docs/interfaces/CipherSuiteParams.html index 7504cd19b..f13cca8a2 100644 --- a/core/docs/interfaces/CipherSuiteParams.html +++ b/core/docs/interfaces/CipherSuiteParams.html @@ -1,8 +1,8 @@ CipherSuiteParams | @hpke/core

Interface CipherSuiteParams

The parameters used to configure the CipherSuite.

-

Hierarchy

  • CipherSuiteParams

Properties

Hierarchy

  • CipherSuiteParams

Properties

Properties

The AEAD (Authenticated Encryption with Addtional Data) identifier or the AEAD object.

-

The KDF (Key Derivation Function) identifier or the KDF object.

-

The KEM (Key Encapsulation Mechanism) identifier or the KEM object.

-

Generated using TypeDoc

\ No newline at end of file +

The KDF (Key Derivation Function) identifier or the KDF object.

+

The KEM (Key Encapsulation Mechanism) identifier or the KEM object.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/CipherSuiteSealResponse.html b/core/docs/interfaces/CipherSuiteSealResponse.html index ac288269d..87531eb47 100644 --- a/core/docs/interfaces/CipherSuiteSealResponse.html +++ b/core/docs/interfaces/CipherSuiteSealResponse.html @@ -1,6 +1,6 @@ CipherSuiteSealResponse | @hpke/core

Interface CipherSuiteSealResponse

The response of the single-shot seal API.

-

Hierarchy

  • CipherSuiteSealResponse

Properties

ct +

Hierarchy

  • CipherSuiteSealResponse

Properties

Properties

ct: ArrayBuffer

The ciphertext as bytes.

-
enc: ArrayBuffer

The encapsulated key.

-

Generated using TypeDoc

\ No newline at end of file +
enc: ArrayBuffer

The encapsulated key.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/EncryptionContext.html b/core/docs/interfaces/EncryptionContext.html index 177a99362..d16663c0f 100644 --- a/core/docs/interfaces/EncryptionContext.html +++ b/core/docs/interfaces/EncryptionContext.html @@ -1,5 +1,5 @@ EncryptionContext | @hpke/core

Interface EncryptionContext

The encryption context interface for a recipient and a sender.

-

Hierarchy

Methods

Hierarchy

Methods

Methods

  • Exports a secret using a variable-length pseudorandom function.

    @@ -8,16 +8,16 @@
  • len: number

    A desired length in bytes of the output secret.

Returns Promise<ArrayBuffer>

A secret string as bytes.

Throws

ExportError

-
  • Decrypts data.

    If the error occurred, throws OpenError.

    Parameters

    • data: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    Throws

    OpenError

    -
  • Encrypts data.

    If the error occurred, throws SealError | MessageLimitReachedError.

    Parameters

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A cipher text as bytes.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/KdfInterface.html b/core/docs/interfaces/KdfInterface.html index 5d0bc9ff6..6c53de266 100644 --- a/core/docs/interfaces/KdfInterface.html +++ b/core/docs/interfaces/KdfInterface.html @@ -1,5 +1,5 @@ KdfInterface | @hpke/core

Interface KdfInterface

The KDF interface.

-

Hierarchy

  • KdfInterface

Properties

Hierarchy

  • KdfInterface

Properties

hashSize: number

The output size of the extract() function in bytes (Nh).

-
id: KdfId

The KDF identifier.

-

Methods

id: KdfId

The KDF identifier.

+

Methods

  • Builds a labeled input keying material.

    Parameters

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • ikm: Uint8Array

    Returns Uint8Array

    An input keying material as bytes.

    -
  • Builds a labeled info string.

    Parameters

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • info: Uint8Array

      An additional byte string.

    • len: number

      The length of the output byte string.

    Returns Uint8Array

    An info string as bytes.

    -
  • Expands a pseudorandom key prk.

    Parameters

    • prk: ArrayBuffer

      A pseudorandom key.

    • info: ArrayBuffer

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Extracts a pseudorandom key of fixed length (Nh) bytes.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • ikm: ArrayBuffer

      An input keying material

    Returns Promise<ArrayBuffer>

    A pseudorandom key as bytes.

    -
  • Extracts a pseudorandom key and expand it to a specified length keying material.

    +
  • Extracts a pseudorandom key and expand it to a specified length keying material.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • ikm: ArrayBuffer

      An input keying material

    • info: ArrayBuffer

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Initializes the instance by setting a suite_id defined in RFC9180.

    Parameters

    • suiteId: Uint8Array

      A suite_id defined in RFC9180.

      -

    Returns void

  • Extracts a pseudorandom key with label.

    +

Returns void

  • Extracts a pseudorandom key with label.

    Parameters

    • prk: ArrayBuffer

      A pseudorandom key.

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • info: Uint8Array

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Extracts a pseudorandom key with label.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • ikm: Uint8Array

      An input keying material

    Returns Promise<ArrayBuffer>

    A pseudorandom key as bytes.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/KemInterface.html b/core/docs/interfaces/KemInterface.html index a79dcd36a..26e33aa8b 100644 --- a/core/docs/interfaces/KemInterface.html +++ b/core/docs/interfaces/KemInterface.html @@ -1,5 +1,5 @@ KemInterface | @hpke/core

Interface KemInterface

The KEM interface.

-

Hierarchy

  • KemInterface

Properties

Hierarchy

  • KemInterface

Properties

encSize: number

The length in bytes of an encapsulated key produced by this KEM (Nenc).

-
id: KemId

The KEM identifier.

-
privateKeySize: number

The length in bytes of an encoded private key for this KEM (Nsk).

-
publicKeySize: number

The length in bytes of an encoded public key for this KEM (Npk).

-
secretSize: number

The length in bytes of a KEM shared secret produced by this KEM (Nsecret).

-

Methods

id: KemId

The KEM identifier.

+
privateKeySize: number

The length in bytes of an encoded private key for this KEM (Nsk).

+
publicKeySize: number

The length in bytes of an encoded public key for this KEM (Npk).

+
secretSize: number

The length in bytes of a KEM shared secret produced by this KEM (Nsecret).

+

Methods

  • Generates an ephemeral, fixed-length symmetric key and +

  • Generates an ephemeral, fixed-length symmetric key and a fixed-length encapsulation of the key that can be decapsulated by the holder of the private key corresponding to pkR.

    If the error occurred, throws EncapError.

    Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

    A shared secret and an encapsulated key as the output of the encapsulation step.

    Throws

    EncapError

    -
  • Imports a public or private key and converts to a CryptoKey.

    Since key parameters for createSenderContext or createRecipientContext are CryptoKey format, you have to use this function to convert provided keys to CryptoKey.

    @@ -61,14 +61,14 @@
  • Optional isPublic: boolean

    The indicator whether the provided key is a public key or not, which is used only for 'raw' format.

Returns Promise<CryptoKey>

A public or private CryptoKey.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/PreSharedKey.html b/core/docs/interfaces/PreSharedKey.html index c5005ffb1..b6abd7cb1 100644 --- a/core/docs/interfaces/PreSharedKey.html +++ b/core/docs/interfaces/PreSharedKey.html @@ -1,6 +1,6 @@ PreSharedKey | @hpke/core

Interface PreSharedKey

The pre-shared key interface.

-

Hierarchy

  • PreSharedKey

Properties

id +

Hierarchy

  • PreSharedKey

Properties

Properties

id: ArrayBuffer

The key identifier.

-
key: ArrayBuffer

The body of the pre-shared key.

-

Generated using TypeDoc

\ No newline at end of file +
key: ArrayBuffer

The body of the pre-shared key.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/RecipientContextParams.html b/core/docs/interfaces/RecipientContextParams.html index 49a62d563..9d976f818 100644 --- a/core/docs/interfaces/RecipientContextParams.html +++ b/core/docs/interfaces/RecipientContextParams.html @@ -1,13 +1,13 @@ RecipientContextParams | @hpke/core

Interface RecipientContextParams

The parameters used to setup the RecipientContext.

-

Hierarchy

  • KeyScheduleParams
    • RecipientContextParams

Properties

enc +

Hierarchy

  • KeyScheduleParams
    • RecipientContextParams

Properties

enc: ArrayBuffer

A byte string of the encapsulated key received from a sender.

-
info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

-

A pre-shared key (PSK) held by both the sender and recipient. +

info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

+

A pre-shared key (PSK) held by both the sender and recipient. The PSK should have at least 32 bytes :and the maxmum length of the PSK is 128 bytes.

-
recipientKey: CryptoKeyPair | CryptoKey

A recipient private key or a key pair.

-
senderPublicKey?: CryptoKey

A sender public key for Auth mode.

-

Generated using TypeDoc

\ No newline at end of file +
recipientKey: CryptoKeyPair | CryptoKey

A recipient private key or a key pair.

+
senderPublicKey?: CryptoKey

A sender public key for Auth mode.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/SenderContext.html b/core/docs/interfaces/SenderContext.html index fa3cbad8a..9b850ba45 100644 --- a/core/docs/interfaces/SenderContext.html +++ b/core/docs/interfaces/SenderContext.html @@ -1,25 +1,25 @@ SenderContext | @hpke/core

Interface SenderContext

The sender encryption context.

-

Hierarchy

Properties

enc +

Hierarchy

Properties

Methods

Properties

enc: ArrayBuffer

The encapsulated key generated by the sender.

-

Methods

Methods

  • Exports a secret using a variable-length pseudorandom function.

    If the error occurred, throws ExportError.

    Parameters

    • exporterContext: ArrayBuffer

      An exporter context string as bytes. The maximum length is 128 bytes.

    • len: number

      A desired length in bytes of the output secret.

    Returns Promise<ArrayBuffer>

    A secret string as bytes.

    Throws

    ExportError

    -
  • Decrypts data.

    If the error occurred, throws OpenError.

    Parameters

    • data: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    Throws

    OpenError

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/interfaces/SenderContextParams.html b/core/docs/interfaces/SenderContextParams.html index e3774b1bf..56676bc8b 100644 --- a/core/docs/interfaces/SenderContextParams.html +++ b/core/docs/interfaces/SenderContextParams.html @@ -1,13 +1,13 @@ SenderContextParams | @hpke/core

Interface SenderContextParams

The parameters used to setup the SenderContext.

-

Hierarchy

  • KeyScheduleParams
    • SenderContextParams

Properties

Hierarchy

  • KeyScheduleParams
    • SenderContextParams

Properties

ekm?: ArrayBuffer | CryptoKeyPair

DO NOT USE. FOR DEBUGGING/TESTING PURPOSES ONLY.

-
info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

-

A pre-shared key (PSK) held by both the sender and recipient. +

info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

+

A pre-shared key (PSK) held by both the sender and recipient. The PSK should have at least 32 bytes :and the maxmum length of the PSK is 128 bytes.

-
recipientPublicKey: CryptoKey

A recipient public key.

-
senderKey?: CryptoKeyPair | CryptoKey

A sender private key or a key pair for Auth mode.

-

Generated using TypeDoc

\ No newline at end of file +
recipientPublicKey: CryptoKey

A recipient public key.

+
senderKey?: CryptoKeyPair | CryptoKey

A sender private key or a key pair for Auth mode.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/types/AeadId.html b/core/docs/types/AeadId.html index a8fd0c797..f22cd1efd 100644 --- a/core/docs/types/AeadId.html +++ b/core/docs/types/AeadId.html @@ -1,2 +1,2 @@ AeadId | @hpke/core

Type alias AeadId

AeadId: typeof AeadId[keyof typeof AeadId]

The type alias of the supported AEAD identifiers.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/types/KdfId.html b/core/docs/types/KdfId.html index 7c7c24528..d714081e8 100644 --- a/core/docs/types/KdfId.html +++ b/core/docs/types/KdfId.html @@ -1,2 +1,2 @@ KdfId | @hpke/core

Type alias KdfId

KdfId: typeof KdfId[keyof typeof KdfId]

The type alias of the supported KDF identifiers.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/types/KemId.html b/core/docs/types/KemId.html index c881cd271..20ec644af 100644 --- a/core/docs/types/KemId.html +++ b/core/docs/types/KemId.html @@ -1,2 +1,2 @@ KemId | @hpke/core

Type alias KemId

KemId: typeof KemId[keyof typeof KemId]

The type alias of the supported KEM identifiers.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/types/RecipientContext.html b/core/docs/types/RecipientContext.html index f2b8ac298..3b1a8f079 100644 --- a/core/docs/types/RecipientContext.html +++ b/core/docs/types/RecipientContext.html @@ -1,2 +1,2 @@ RecipientContext | @hpke/core

Type alias RecipientContext

RecipientContext: EncryptionContext

The recipient encryption context.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/variables/AeadId-1.html b/core/docs/variables/AeadId-1.html index 27015d719..97fe476e5 100644 --- a/core/docs/variables/AeadId-1.html +++ b/core/docs/variables/AeadId-1.html @@ -1,2 +1,2 @@ AeadId | @hpke/core

Variable AeadIdConst

AeadId: {
    Aes128Gcm: 1;
    Aes256Gcm: 2;
    Chacha20Poly1305: 3;
    ExportOnly: 65535;
} = Aead

The supported Authenticated Encryption with Associated Data (AEAD) identifiers.

-

Type declaration

  • Readonly Aes128Gcm: 1
  • Readonly Aes256Gcm: 2
  • Readonly Chacha20Poly1305: 3
  • Readonly ExportOnly: 65535

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/variables/KdfId-1.html b/core/docs/variables/KdfId-1.html index a3ab98bf3..2ca4a381a 100644 --- a/core/docs/variables/KdfId-1.html +++ b/core/docs/variables/KdfId-1.html @@ -1,2 +1,2 @@ KdfId | @hpke/core

Variable KdfIdConst

KdfId: {
    HkdfSha256: 1;
    HkdfSha384: 2;
    HkdfSha512: 3;
} = Kdf

The supported Key Derivation Function (KDF) identifiers.

-

Type declaration

  • Readonly HkdfSha256: 1
  • Readonly HkdfSha384: 2
  • Readonly HkdfSha512: 3

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/core/docs/variables/KemId-1.html b/core/docs/variables/KemId-1.html index cb67b0354..89fe16d17 100644 --- a/core/docs/variables/KemId-1.html +++ b/core/docs/variables/KemId-1.html @@ -1,2 +1,2 @@ KemId | @hpke/core

Variable KemIdConst

KemId: {
    DhkemP256HkdfSha256: 16;
    DhkemP384HkdfSha384: 17;
    DhkemP521HkdfSha512: 18;
    DhkemSecp256k1HkdfSha256: 19;
    DhkemX25519HkdfSha256: 32;
    DhkemX448HkdfSha512: 33;
    HybridkemX25519Kyber768: 48;
    NotAssigned: 0;
} = Kem

The supported Key Encapsulation Mechanism (KEM) identifiers.

-

Type declaration

  • Readonly DhkemP256HkdfSha256: 16
  • Readonly DhkemP384HkdfSha384: 17
  • Readonly DhkemP521HkdfSha512: 18
  • Readonly DhkemSecp256k1HkdfSha256: 19
  • Readonly DhkemX25519HkdfSha256: 32
  • Readonly DhkemX448HkdfSha512: 33
  • Readonly HybridkemX25519Kyber768: 48
  • Readonly NotAssigned: 0

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/dhkem-secp256k1/docs/classes/DhkemSecp256k1HkdfSha256.html b/dhkem-secp256k1/docs/classes/DhkemSecp256k1HkdfSha256.html index aeaef949f..94b313d7b 100644 --- a/dhkem-secp256k1/docs/classes/DhkemSecp256k1HkdfSha256.html +++ b/dhkem-secp256k1/docs/classes/DhkemSecp256k1HkdfSha256.html @@ -13,7 +13,7 @@

Example

Use with @hpke/core (https://deno.land/x/h

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";

const suite = new CipherSuite({
kem: new DhkemSecp256k1HkdfSha256(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});

Note that it is experimental and not standardized.

-

Hierarchy

  • Dhkem
    • DhkemSecp256k1HkdfSha256

Constructors

Hierarchy

  • Dhkem
    • DhkemSecp256k1HkdfSha256

Constructors

Properties

_kdf _prim encSize @@ -30,9 +30,9 @@

Example

Use with @hpke/core (https://deno.land/x/h importKey serializePrivateKey serializePublicKey -

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 33

33

-
id: KemId = KemId.DhkemSecp256k1HkdfSha256

KemId.DhkemSecp256k1HkdfSha256 (0x0013) EXPERIMENTAL

-
privateKeySize: number = 32

32

-
publicKeySize: number = 33

33

-
secretSize: number = 32

32

-

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 33

33

+
id: KemId = KemId.DhkemSecp256k1HkdfSha256

KemId.DhkemSecp256k1HkdfSha256 (0x0013) EXPERIMENTAL

+
privateKeySize: number = 32

32

+
publicKeySize: number = 33

33

+
secretSize: number = 32

32

+

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/dhkem-x25519/docs/classes/DhkemX25519HkdfSha256.html b/dhkem-x25519/docs/classes/DhkemX25519HkdfSha256.html index febef2f89..55343e036 100644 --- a/dhkem-x25519/docs/classes/DhkemX25519HkdfSha256.html +++ b/dhkem-x25519/docs/classes/DhkemX25519HkdfSha256.html @@ -10,7 +10,7 @@ can be used. You don't need to use this class.

Example

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,
});
-

Hierarchy

  • Dhkem
    • DhkemX25519HkdfSha256

Constructors

Hierarchy

  • Dhkem
    • DhkemX25519HkdfSha256

Constructors

Properties

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 32

32

-
id: KemId = KemId.DhkemX25519HkdfSha256

KemId.DhkemX25519HkdfSha256 (0x0020)

-
privateKeySize: number = 32

32

-
publicKeySize: number = 32

32

-
secretSize: number = 32

32

-

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 32

32

+
id: KemId = KemId.DhkemX25519HkdfSha256

KemId.DhkemX25519HkdfSha256 (0x0020)

+
privateKeySize: number = 32

32

+
publicKeySize: number = 32

32

+
secretSize: number = 32

32

+

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/dhkem-x448/docs/classes/DhkemX448HkdfSha512.html b/dhkem-x448/docs/classes/DhkemX448HkdfSha512.html index 67ef5203d..a604a355a 100644 --- a/dhkem-x448/docs/classes/DhkemX448HkdfSha512.html +++ b/dhkem-x448/docs/classes/DhkemX448HkdfSha512.html @@ -9,7 +9,7 @@

Example

Use with @hpke/core (https://deno.land/x/hpke/core/mod.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";

const suite = new CipherSuite({
kem: new DhkemX448HkdfSha512(),
kdf: new HkdfSha512(),
aead: new Aes256Gcm(),
});
-

Hierarchy

  • Dhkem
    • DhkemX448HkdfSha512

Constructors

Hierarchy

  • Dhkem
    • DhkemX448HkdfSha512

Constructors

Properties

_kdf _prim encSize @@ -26,9 +26,9 @@

Example

Use with @hpke/core (https://deno.land/x/h importKey serializePrivateKey serializePublicKey -

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 56

56

-
id: KemId = KemId.DhkemX448HkdfSha512

KemId.DhkemX448HkdfSha512 (0x0021)

-
privateKeySize: number = 56

56

-
publicKeySize: number = 56

56

-
secretSize: number = 64

64

-

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_kdf: KdfInterface
_prim: DhkemPrimitives
encSize: number = 56

56

+
id: KemId = KemId.DhkemX448HkdfSha512

KemId.DhkemX448HkdfSha512 (0x0021)

+
privateKeySize: number = 56

56

+
publicKeySize: number = 56

56

+
secretSize: number = 64

64

+

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/BaseError.html b/docs/classes/BaseError.html index 44f452cf0..0c739382e 100644 --- a/docs/classes/BaseError.html +++ b/docs/classes/BaseError.html @@ -1,7 +1,7 @@ BaseError | hpke-js

Class BaseError

The base error class of hpke-js.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/CipherSuite.html b/docs/classes/CipherSuite.html index 16f1c0866..2259e68e5 100644 --- a/docs/classes/CipherSuite.html +++ b/docs/classes/CipherSuite.html @@ -29,7 +29,7 @@

Example

Use a ciphersuite consisting of an external module.

import { AeadId, CipherSuite, KdfId } from "http://deno.land/x/hpke/mod.ts";
// Use an extension module.
import {
HybridkemX25519Kyber768,
} from "https://deno.land/x/hpke/x/hybridkem-x25519-kyber768/mod.ts";

const suite = new CipherSuite({
kem: new HybridkemX25519Kyber768(),
kdf: KdfId.HkdfSha256,
aead: AeadId.Aes128Gcm,
});
-

Hierarchy

  • CipherSuiteNative
    • CipherSuite

Constructors

Hierarchy

  • CipherSuiteNative
    • CipherSuite

Constructors

Properties

Accessors

aead @@ -45,33 +45,33 @@

Example

Use a ciphersuite consisting of an external module.

seal

Constructors

Properties

_api: SubtleCrypto = undefined

Accessors

Methods

  • Returns Promise<void>

Properties

_api: SubtleCrypto = undefined

Accessors

Methods

  • Returns Promise<void>

  • Derives a key pair for the cipher suite in the manner +

  • Generates a key pair for the cipher suite.

    +
  • Imports a public or private key and converts to a CryptoKey.

    +
  • Imports a public or private key and converts to a CryptoKey.

    Since key parameters for createSenderContext or createRecipientContext are CryptoKey format, you have to use this function to convert provided keys to CryptoKey.

    @@ -84,18 +84,18 @@

    Throws

    NotSup

Returns Promise<CryptoKey>

A public or private CryptoKey.

  • Decrypts a message from a sender.

    +
  • Decrypts a message from a sender.

    If the error occurred, throws DecapError | DeserializeError | OpenError | ValidationError.

    Parameters

    • params: RecipientContextParams

      A set of parameters for building a recipient encryption context.

    • ct: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • aad: ArrayBuffer = EMPTY

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/DecapError.html b/docs/classes/DecapError.html index 656054414..b2251bed6 100644 --- a/docs/classes/DecapError.html +++ b/docs/classes/DecapError.html @@ -1,7 +1,7 @@ DecapError | hpke-js

Class DecapError

decap() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/DeriveKeyPairError.html b/docs/classes/DeriveKeyPairError.html index 373dcfb16..a7a267c80 100644 --- a/docs/classes/DeriveKeyPairError.html +++ b/docs/classes/DeriveKeyPairError.html @@ -1,7 +1,7 @@ DeriveKeyPairError | hpke-js

Class DeriveKeyPairError

Key pair derivation failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/DeserializeError.html b/docs/classes/DeserializeError.html index 357fb7bdf..ad53da789 100644 --- a/docs/classes/DeserializeError.html +++ b/docs/classes/DeserializeError.html @@ -1,7 +1,7 @@ DeserializeError | hpke-js

Class DeserializeError

Public or private key deserialization failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/EncapError.html b/docs/classes/EncapError.html index 8b1effccc..bed85654c 100644 --- a/docs/classes/EncapError.html +++ b/docs/classes/EncapError.html @@ -1,7 +1,7 @@ EncapError | hpke-js

Class EncapError

encap() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/ExportError.html b/docs/classes/ExportError.html index 361272710..5ac45837f 100644 --- a/docs/classes/ExportError.html +++ b/docs/classes/ExportError.html @@ -1,7 +1,7 @@ ExportError | hpke-js

Class ExportError

Secret export failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/HpkeError.html b/docs/classes/HpkeError.html index a0227fcc6..1dd309957 100644 --- a/docs/classes/HpkeError.html +++ b/docs/classes/HpkeError.html @@ -1,7 +1,7 @@ HpkeError | hpke-js

Class HpkeError

The base error class of hpke-js.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/InvalidParamError.html b/docs/classes/InvalidParamError.html index c7369c8a6..e1e7e2760 100644 --- a/docs/classes/InvalidParamError.html +++ b/docs/classes/InvalidParamError.html @@ -1,7 +1,7 @@ InvalidParamError | hpke-js

Class InvalidParamError

Invalid parameter.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/MessageLimitReachedError.html b/docs/classes/MessageLimitReachedError.html index e84b61ac5..e3c9c05f1 100644 --- a/docs/classes/MessageLimitReachedError.html +++ b/docs/classes/MessageLimitReachedError.html @@ -1,7 +1,7 @@ MessageLimitReachedError | hpke-js

Class MessageLimitReachedError

Sequence number overflow on the encryption context.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/NotSupportedError.html b/docs/classes/NotSupportedError.html index 8c8bb3b58..1c0c50ad1 100644 --- a/docs/classes/NotSupportedError.html +++ b/docs/classes/NotSupportedError.html @@ -1,7 +1,7 @@ NotSupportedError | hpke-js

Class NotSupportedError

Not supported failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/OpenError.html b/docs/classes/OpenError.html index 928e9d200..064e60f2f 100644 --- a/docs/classes/OpenError.html +++ b/docs/classes/OpenError.html @@ -1,7 +1,7 @@ OpenError | hpke-js

Class OpenError

open() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/SealError.html b/docs/classes/SealError.html index 52246501d..8e336648e 100644 --- a/docs/classes/SealError.html +++ b/docs/classes/SealError.html @@ -1,7 +1,7 @@ SealError | hpke-js

Class SealError

seal() failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/SerializeError.html b/docs/classes/SerializeError.html index 9beaca716..506a68129 100644 --- a/docs/classes/SerializeError.html +++ b/docs/classes/SerializeError.html @@ -1,7 +1,7 @@ SerializeError | hpke-js

Class SerializeError

Public or private key serialization failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/classes/ValidationError.html b/docs/classes/ValidationError.html index 4d5e1bc87..c0d2c6462 100644 --- a/docs/classes/ValidationError.html +++ b/docs/classes/ValidationError.html @@ -1,7 +1,7 @@ ValidationError | hpke-js

Class ValidationError

KEM input or output validation failure.

-

Hierarchy

Constructors

Hierarchy

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 diff --git a/docs/interfaces/AeadEncryptionContext.html b/docs/interfaces/AeadEncryptionContext.html index 78a7e192b..10cf1e022 100644 --- a/docs/interfaces/AeadEncryptionContext.html +++ b/docs/interfaces/AeadEncryptionContext.html @@ -1,14 +1,14 @@ AeadEncryptionContext | hpke-js

Interface AeadEncryptionContext

The AEAD encryption context interface.

-

Hierarchy

  • AeadEncryptionContext

Methods

Hierarchy

  • AeadEncryptionContext

Methods

Methods

  • Decrypts data with an initialization vector and additional authenticated data.

    Parameters

    • iv: ArrayBuffer

      An initialization vector.

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    -
  • Encrypts data with an initialization vector and additional authenticated data.

    Parameters

    • iv: ArrayBuffer

      An initialization vector.

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A cipher text as bytes.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/AeadInterface.html b/docs/interfaces/AeadInterface.html index 1e42d6346..12f2ecf13 100644 --- a/docs/interfaces/AeadInterface.html +++ b/docs/interfaces/AeadInterface.html @@ -1,14 +1,14 @@ AeadInterface | hpke-js

Interface AeadInterface

The AEAD interface.

-

Hierarchy

  • AeadInterface

Properties

id +

Hierarchy

  • AeadInterface

Properties

id: AeadId

The KDF identifier.

-
keySize: number

The length in bytes of an AEAD key (Nk).

-
nonceSize: number

The length in bytes of an AEAD nonce (Nn).

-
tagSize: number

The length in bytes of an AEAD authentication tag (Nt).

-

Methods

keySize: number

The length in bytes of an AEAD key (Nk).

+
nonceSize: number

The length in bytes of an AEAD nonce (Nn).

+
tagSize: number

The length in bytes of an AEAD authentication tag (Nt).

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/CipherSuiteParams.html b/docs/interfaces/CipherSuiteParams.html index 154d489fe..63a1e521e 100644 --- a/docs/interfaces/CipherSuiteParams.html +++ b/docs/interfaces/CipherSuiteParams.html @@ -1,8 +1,8 @@ CipherSuiteParams | hpke-js

Interface CipherSuiteParams

The parameters used to configure the CipherSuite.

-

Hierarchy

  • CipherSuiteParams

Properties

Hierarchy

  • CipherSuiteParams

Properties

Properties

The AEAD (Authenticated Encryption with Addtional Data) identifier or the AEAD object.

-

The KDF (Key Derivation Function) identifier or the KDF object.

-

The KEM (Key Encapsulation Mechanism) identifier or the KEM object.

-

Generated using TypeDoc

\ No newline at end of file +

The KDF (Key Derivation Function) identifier or the KDF object.

+

The KEM (Key Encapsulation Mechanism) identifier or the KEM object.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/CipherSuiteSealResponse.html b/docs/interfaces/CipherSuiteSealResponse.html index 6f79afa92..6a726da77 100644 --- a/docs/interfaces/CipherSuiteSealResponse.html +++ b/docs/interfaces/CipherSuiteSealResponse.html @@ -1,6 +1,6 @@ CipherSuiteSealResponse | hpke-js

Interface CipherSuiteSealResponse

The response of the single-shot seal API.

-

Hierarchy

  • CipherSuiteSealResponse

Properties

ct +

Hierarchy

  • CipherSuiteSealResponse

Properties

Properties

ct: ArrayBuffer

The ciphertext as bytes.

-
enc: ArrayBuffer

The encapsulated key.

-

Generated using TypeDoc

\ No newline at end of file +
enc: ArrayBuffer

The encapsulated key.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/EncryptionContext.html b/docs/interfaces/EncryptionContext.html index 8f3ebc971..0bcb228ea 100644 --- a/docs/interfaces/EncryptionContext.html +++ b/docs/interfaces/EncryptionContext.html @@ -1,5 +1,5 @@ EncryptionContext | hpke-js

Interface EncryptionContext

The encryption context interface for a recipient and a sender.

-

Hierarchy

Methods

Hierarchy

Methods

Methods

  • Exports a secret using a variable-length pseudorandom function.

    @@ -8,16 +8,16 @@
  • len: number

    A desired length in bytes of the output secret.

Returns Promise<ArrayBuffer>

A secret string as bytes.

Throws

ExportError

-
  • Decrypts data.

    If the error occurred, throws OpenError.

    Parameters

    • data: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    Throws

    OpenError

    -
  • Encrypts data.

    If the error occurred, throws SealError | MessageLimitReachedError.

    Parameters

    • data: ArrayBuffer

      A plain text as bytes to be encrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A cipher text as bytes.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/KdfInterface.html b/docs/interfaces/KdfInterface.html index d0cf09355..f5a5f1486 100644 --- a/docs/interfaces/KdfInterface.html +++ b/docs/interfaces/KdfInterface.html @@ -1,5 +1,5 @@ KdfInterface | hpke-js

Interface KdfInterface

The KDF interface.

-

Hierarchy

  • KdfInterface

Properties

Hierarchy

  • KdfInterface

Properties

hashSize: number

The output size of the extract() function in bytes (Nh).

-
id: KdfId

The KDF identifier.

-

Methods

id: KdfId

The KDF identifier.

+

Methods

  • Builds a labeled input keying material.

    Parameters

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • ikm: Uint8Array

    Returns Uint8Array

    An input keying material as bytes.

    -
  • Builds a labeled info string.

    Parameters

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • info: Uint8Array

      An additional byte string.

    • len: number

      The length of the output byte string.

    Returns Uint8Array

    An info string as bytes.

    -
  • Expands a pseudorandom key prk.

    Parameters

    • prk: ArrayBuffer

      A pseudorandom key.

    • info: ArrayBuffer

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Extracts a pseudorandom key of fixed length (Nh) bytes.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • ikm: ArrayBuffer

      An input keying material

    Returns Promise<ArrayBuffer>

    A pseudorandom key as bytes.

    -
  • Extracts a pseudorandom key and expand it to a specified length keying material.

    +
  • Extracts a pseudorandom key and expand it to a specified length keying material.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • ikm: ArrayBuffer

      An input keying material

    • info: ArrayBuffer

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Initializes the instance by setting a suite_id defined in RFC9180.

    Parameters

    • suiteId: Uint8Array

      A suite_id defined in RFC9180.

      -

    Returns void

  • Extracts a pseudorandom key with label.

    +

Returns void

  • Extracts a pseudorandom key with label.

    Parameters

    • prk: ArrayBuffer

      A pseudorandom key.

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • info: Uint8Array

      An additional byte string.

    • len: number

      The length in bytes of the output keying material.

    Returns Promise<ArrayBuffer>

    An output keying material as bytes.

    -
  • Extracts a pseudorandom key with label.

    Parameters

    • salt: ArrayBuffer

      An additional random byte string.

    • label: Uint8Array

      A byte string indicating the cryptographic context/operation.

    • ikm: Uint8Array

      An input keying material

    Returns Promise<ArrayBuffer>

    A pseudorandom key as bytes.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/KemInterface.html b/docs/interfaces/KemInterface.html index 52f148873..6b1847a46 100644 --- a/docs/interfaces/KemInterface.html +++ b/docs/interfaces/KemInterface.html @@ -1,5 +1,5 @@ KemInterface | hpke-js

Interface KemInterface

The KEM interface.

-

Hierarchy

  • KemInterface

Properties

Hierarchy

  • KemInterface

Properties

encSize: number

The length in bytes of an encapsulated key produced by this KEM (Nenc).

-
id: KemId

The KEM identifier.

-
privateKeySize: number

The length in bytes of an encoded private key for this KEM (Nsk).

-
publicKeySize: number

The length in bytes of an encoded public key for this KEM (Npk).

-
secretSize: number

The length in bytes of a KEM shared secret produced by this KEM (Nsecret).

-

Methods

id: KemId

The KEM identifier.

+
privateKeySize: number

The length in bytes of an encoded private key for this KEM (Nsk).

+
publicKeySize: number

The length in bytes of an encoded public key for this KEM (Npk).

+
secretSize: number

The length in bytes of a KEM shared secret produced by this KEM (Nsecret).

+

Methods

  • Recovers the ephemeral symmetric key from its encapsulated representation enc.

    If the error occurred, throws DecapError.

    Parameters

    Returns Promise<ArrayBuffer>

    A shared secret as the output of the decapsulation step.

    Throws

    DecapError

    -
  • Generates an ephemeral, fixed-length symmetric key and +

  • Generates an ephemeral, fixed-length symmetric key and a fixed-length encapsulation of the key that can be decapsulated by the holder of the private key corresponding to pkR.

    If the error occurred, throws EncapError.

    Parameters

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

    A shared secret and an encapsulated key as the output of the encapsulation step.

    Throws

    EncapError

    -
  • Imports a public or private key and converts to a CryptoKey.

    Since key parameters for createSenderContext or createRecipientContext are CryptoKey format, you have to use this function to convert provided keys to CryptoKey.

    @@ -61,14 +61,14 @@
  • Optional isPublic: boolean

    The indicator whether the provided key is a public key or not, which is used only for 'raw' format.

Returns Promise<CryptoKey>

A public or private CryptoKey.

  • Serializes a private key as CryptoKey to a byte string of length Nsk.

    If the error occurred, throws SerializeError.

    Parameters

    • key: CryptoKey

      A CryptoKey.

    Returns Promise<ArrayBuffer>

    A key as bytes.

  • Serializes a public key as CryptoKey to a byte string of length Npk.

    If the error occurred, throws SerializeError.

    Parameters

    • key: CryptoKey

      A CryptoKey.

    Returns Promise<ArrayBuffer>

    A key as bytes.

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PreSharedKey.html b/docs/interfaces/PreSharedKey.html index ee580047a..80b7bbf63 100644 --- a/docs/interfaces/PreSharedKey.html +++ b/docs/interfaces/PreSharedKey.html @@ -1,6 +1,6 @@ PreSharedKey | hpke-js

Interface PreSharedKey

The pre-shared key interface.

-

Hierarchy

  • PreSharedKey

Properties

id +

Hierarchy

  • PreSharedKey

Properties

Properties

id: ArrayBuffer

The key identifier.

-
key: ArrayBuffer

The body of the pre-shared key.

-

Generated using TypeDoc

\ No newline at end of file +
key: ArrayBuffer

The body of the pre-shared key.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/RecipientContextParams.html b/docs/interfaces/RecipientContextParams.html index 006a8fb3c..75aefc1f1 100644 --- a/docs/interfaces/RecipientContextParams.html +++ b/docs/interfaces/RecipientContextParams.html @@ -1,13 +1,13 @@ RecipientContextParams | hpke-js

Interface RecipientContextParams

The parameters used to setup the RecipientContext.

-

Hierarchy

  • KeyScheduleParams
    • RecipientContextParams

Properties

enc +

Hierarchy

  • KeyScheduleParams
    • RecipientContextParams

Properties

enc: ArrayBuffer

A byte string of the encapsulated key received from a sender.

-
info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

-

A pre-shared key (PSK) held by both the sender and recipient. +

info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

+

A pre-shared key (PSK) held by both the sender and recipient. The PSK should have at least 32 bytes :and the maxmum length of the PSK is 128 bytes.

-
recipientKey: CryptoKeyPair | CryptoKey

A recipient private key or a key pair.

-
senderPublicKey?: CryptoKey

A sender public key for Auth mode.

-

Generated using TypeDoc

\ No newline at end of file +
recipientKey: CryptoKeyPair | CryptoKey

A recipient private key or a key pair.

+
senderPublicKey?: CryptoKey

A sender public key for Auth mode.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/SenderContext.html b/docs/interfaces/SenderContext.html index 7ad792c0e..a32a55888 100644 --- a/docs/interfaces/SenderContext.html +++ b/docs/interfaces/SenderContext.html @@ -1,25 +1,25 @@ SenderContext | hpke-js

Interface SenderContext

The sender encryption context.

-

Hierarchy

Properties

enc +

Hierarchy

Properties

Methods

Properties

enc: ArrayBuffer

The encapsulated key generated by the sender.

-

Methods

Methods

  • Exports a secret using a variable-length pseudorandom function.

    If the error occurred, throws ExportError.

    Parameters

    • exporterContext: ArrayBuffer

      An exporter context string as bytes. The maximum length is 128 bytes.

    • len: number

      A desired length in bytes of the output secret.

    Returns Promise<ArrayBuffer>

    A secret string as bytes.

    Throws

    ExportError

    -
  • Decrypts data.

    If the error occurred, throws OpenError.

    Parameters

    • data: ArrayBuffer

      An encrypted text as bytes to be decrypted.

    • Optional aad: ArrayBuffer

      Additional authenticated data as bytes fed by an application.

    Returns Promise<ArrayBuffer>

    A decrypted plain text as bytes.

    Throws

    OpenError

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/SenderContextParams.html b/docs/interfaces/SenderContextParams.html index f2a192aec..25208d7df 100644 --- a/docs/interfaces/SenderContextParams.html +++ b/docs/interfaces/SenderContextParams.html @@ -1,13 +1,13 @@ SenderContextParams | hpke-js

Interface SenderContextParams

The parameters used to setup the SenderContext.

-

Hierarchy

  • KeyScheduleParams
    • SenderContextParams

Properties

Hierarchy

  • KeyScheduleParams
    • SenderContextParams

Properties

ekm?: ArrayBuffer | CryptoKeyPair

DO NOT USE. FOR DEBUGGING/TESTING PURPOSES ONLY.

-
info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

-

A pre-shared key (PSK) held by both the sender and recipient. +

info?: ArrayBuffer

Application supplied information. The maximum length is 128 bytes.

+

A pre-shared key (PSK) held by both the sender and recipient. The PSK should have at least 32 bytes :and the maxmum length of the PSK is 128 bytes.

-
recipientPublicKey: CryptoKey

A recipient public key.

-
senderKey?: CryptoKeyPair | CryptoKey

A sender private key or a key pair for Auth mode.

-

Generated using TypeDoc

\ No newline at end of file +
recipientPublicKey: CryptoKey

A recipient public key.

+
senderKey?: CryptoKeyPair | CryptoKey

A sender private key or a key pair for Auth mode.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/Aead.html b/docs/types/Aead.html index 16de1aae0..dc0f54c29 100644 --- a/docs/types/Aead.html +++ b/docs/types/Aead.html @@ -1,3 +1,3 @@ Aead | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/AeadId.html b/docs/types/AeadId.html index 6dcaf4f95..60660ccfb 100644 --- a/docs/types/AeadId.html +++ b/docs/types/AeadId.html @@ -1,2 +1,2 @@ AeadId | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/Kdf.html b/docs/types/Kdf.html index c0746fbf7..594c69483 100644 --- a/docs/types/Kdf.html +++ b/docs/types/Kdf.html @@ -1,3 +1,3 @@ Kdf | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/KdfId.html b/docs/types/KdfId.html index a3cc0bb6b..ceb9eb065 100644 --- a/docs/types/KdfId.html +++ b/docs/types/KdfId.html @@ -1,2 +1,2 @@ KdfId | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/Kem.html b/docs/types/Kem.html index a87ee4dbf..698642470 100644 --- a/docs/types/Kem.html +++ b/docs/types/Kem.html @@ -1,3 +1,3 @@ Kem | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/KemId.html b/docs/types/KemId.html index abb15a8dc..78bccf7e0 100644 --- a/docs/types/KemId.html +++ b/docs/types/KemId.html @@ -1,2 +1,2 @@ KemId | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/RecipientContext.html b/docs/types/RecipientContext.html index 9dd825ffd..a0f1deace 100644 --- a/docs/types/RecipientContext.html +++ b/docs/types/RecipientContext.html @@ -1,2 +1,2 @@ RecipientContext | hpke-js

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/Aead-1.html b/docs/variables/Aead-1.html index 5f660eaaf..e428b6de4 100644 --- a/docs/variables/Aead-1.html +++ b/docs/variables/Aead-1.html @@ -1,3 +1,3 @@ Aead | hpke-js

Variable AeadConst

Aead: {
    Aes128Gcm: 1;
    Aes256Gcm: 2;
    Chacha20Poly1305: 3;
    ExportOnly: 65535;
} = ...

The supported Authenticated Encryption with Associated Data (AEAD) identifiers.

Type declaration

  • Readonly Aes128Gcm: 1
  • Readonly Aes256Gcm: 2
  • Readonly Chacha20Poly1305: 3
  • Readonly ExportOnly: 65535

Deprecated

Use AeadId instead.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/AeadId-1.html b/docs/variables/AeadId-1.html index 794dd95be..6992b4973 100644 --- a/docs/variables/AeadId-1.html +++ b/docs/variables/AeadId-1.html @@ -1,2 +1,2 @@ AeadId | hpke-js

Variable AeadIdConst

AeadId: {
    Aes128Gcm: 1;
    Aes256Gcm: 2;
    Chacha20Poly1305: 3;
    ExportOnly: 65535;
} = Aead

The supported Authenticated Encryption with Associated Data (AEAD) identifiers.

-

Type declaration

  • Readonly Aes128Gcm: 1
  • Readonly Aes256Gcm: 2
  • Readonly Chacha20Poly1305: 3
  • Readonly ExportOnly: 65535

Generated using TypeDoc

\ No newline at end of file +

Type declaration

  • Readonly Aes128Gcm: 1
  • Readonly Aes256Gcm: 2
  • Readonly Chacha20Poly1305: 3
  • Readonly ExportOnly: 65535

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/Kdf-1.html b/docs/variables/Kdf-1.html index ace04848b..325b3da44 100644 --- a/docs/variables/Kdf-1.html +++ b/docs/variables/Kdf-1.html @@ -1,3 +1,3 @@ Kdf | hpke-js

Variable KdfConst

Kdf: {
    HkdfSha256: 1;
    HkdfSha384: 2;
    HkdfSha512: 3;
} = ...

The supported Key Derivation Function (KDF) identifiers.

Type declaration

  • Readonly HkdfSha256: 1
  • Readonly HkdfSha384: 2
  • Readonly HkdfSha512: 3

Deprecated

Use KdfId instead.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/KdfId-1.html b/docs/variables/KdfId-1.html index d8c4f5ca9..0c64a69af 100644 --- a/docs/variables/KdfId-1.html +++ b/docs/variables/KdfId-1.html @@ -1,2 +1,2 @@ KdfId | hpke-js

Variable KdfIdConst

KdfId: {
    HkdfSha256: 1;
    HkdfSha384: 2;
    HkdfSha512: 3;
} = Kdf

The supported Key Derivation Function (KDF) identifiers.

-

Type declaration

  • Readonly HkdfSha256: 1
  • Readonly HkdfSha384: 2
  • Readonly HkdfSha512: 3

Generated using TypeDoc

\ No newline at end of file +

Type declaration

  • Readonly HkdfSha256: 1
  • Readonly HkdfSha384: 2
  • Readonly HkdfSha512: 3

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/Kem-1.html b/docs/variables/Kem-1.html index 586afcf85..7845f2b0d 100644 --- a/docs/variables/Kem-1.html +++ b/docs/variables/Kem-1.html @@ -1,3 +1,3 @@ Kem | hpke-js

Variable KemConst

Kem: {
    DhkemP256HkdfSha256: 16;
    DhkemP384HkdfSha384: 17;
    DhkemP521HkdfSha512: 18;
    DhkemSecp256k1HkdfSha256: 19;
    DhkemX25519HkdfSha256: 32;
    DhkemX448HkdfSha512: 33;
    HybridkemX25519Kyber768: 48;
    NotAssigned: 0;
} = ...

The supported Key Encapsulation Mechanism (KEM) identifiers.

Type declaration

  • Readonly DhkemP256HkdfSha256: 16
  • Readonly DhkemP384HkdfSha384: 17
  • Readonly DhkemP521HkdfSha512: 18
  • Readonly DhkemSecp256k1HkdfSha256: 19
  • Readonly DhkemX25519HkdfSha256: 32
  • Readonly DhkemX448HkdfSha512: 33
  • Readonly HybridkemX25519Kyber768: 48
  • Readonly NotAssigned: 0

Deprecated

Use KdfId instead.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/variables/KemId-1.html b/docs/variables/KemId-1.html index 3ad371d99..b5e0081e0 100644 --- a/docs/variables/KemId-1.html +++ b/docs/variables/KemId-1.html @@ -1,2 +1,2 @@ KemId | hpke-js

Variable KemIdConst

KemId: {
    DhkemP256HkdfSha256: 16;
    DhkemP384HkdfSha384: 17;
    DhkemP521HkdfSha512: 18;
    DhkemSecp256k1HkdfSha256: 19;
    DhkemX25519HkdfSha256: 32;
    DhkemX448HkdfSha512: 33;
    HybridkemX25519Kyber768: 48;
    NotAssigned: 0;
} = Kem

The supported Key Encapsulation Mechanism (KEM) identifiers.

-

Type declaration

  • Readonly DhkemP256HkdfSha256: 16
  • Readonly DhkemP384HkdfSha384: 17
  • Readonly DhkemP521HkdfSha512: 18
  • Readonly DhkemSecp256k1HkdfSha256: 19
  • Readonly DhkemX25519HkdfSha256: 32
  • Readonly DhkemX448HkdfSha512: 33
  • Readonly HybridkemX25519Kyber768: 48
  • Readonly NotAssigned: 0

Generated using TypeDoc

\ No newline at end of file +

Type declaration

  • Readonly DhkemP256HkdfSha256: 16
  • Readonly DhkemP384HkdfSha384: 17
  • Readonly DhkemP521HkdfSha512: 18
  • Readonly DhkemSecp256k1HkdfSha256: 19
  • Readonly DhkemX25519HkdfSha256: 32
  • Readonly DhkemX448HkdfSha512: 33
  • Readonly HybridkemX25519Kyber768: 48
  • Readonly NotAssigned: 0

Generated using TypeDoc

\ No newline at end of file diff --git a/hybridkem-x25519-kyber768/docs/classes/HybridkemX25519Kyber768.html b/hybridkem-x25519-kyber768/docs/classes/HybridkemX25519Kyber768.html index 5bac880c5..7aad89647 100644 --- a/hybridkem-x25519-kyber768/docs/classes/HybridkemX25519Kyber768.html +++ b/hybridkem-x25519-kyber768/docs/classes/HybridkemX25519Kyber768.html @@ -5,7 +5,7 @@ CipherSuiteParams as follows:

Example

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";
const suite = new CipherSuite({
kem: new HybridkemX25519Kyber768(),
kdf: new HkdfSha256(),
aead: new Aes128Gcm(),
});
-

Hierarchy

  • Hybridkem
    • HybridkemX25519Kyber768

Constructors

Hierarchy

  • Hybridkem
    • HybridkemX25519Kyber768

Constructors

Properties

Constructors

Properties

_a: DhkemInterface
_b: KemInterface
_kdf: KdfInterface
auth: boolean = false
encSize: number = 1120
id: KemId = KemId.HybridkemX25519Kyber768
name: string = "X25519Kyber25519"
privateKeySize: number = 2432
publicKeySize: number = 1216
secretSize: number = 64

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

_a: DhkemInterface
_b: KemInterface
_kdf: KdfInterface
auth: boolean = false
encSize: number = 1120
id: KemId = KemId.HybridkemX25519Kyber768
name: string = "X25519Kyber25519"
privateKeySize: number = 2432
publicKeySize: number = 1216
secretSize: number = 64

Methods

  • Parameters

    • params: RecipientContextParams

    Returns Promise<ArrayBuffer>

  • Parameters

    • ikm: ArrayBuffer

    Returns Promise<CryptoKeyPair>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • key: ArrayBuffer

    Returns Promise<CryptoKey>

  • Parameters

    • params: SenderContextParams

    Returns Promise<{
        enc: ArrayBuffer;
        sharedSecret: ArrayBuffer;
    }>

  • Returns Promise<CryptoKeyPair>

  • Parameters

    • format: "raw" | "jwk"
    • key: ArrayBuffer | JsonWebKey
    • isPublic: boolean = true

    Returns Promise<CryptoKey>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

  • Parameters

    • key: CryptoKey

    Returns Promise<ArrayBuffer>

Generated using TypeDoc

\ No newline at end of file