Gordian Envelope TypeScript Library - v1.0.0-alpha.20
    Preparing search index...

    Class ComponentsSealedMessage

    A sealed message providing anonymous authenticated encryption.

    Implements

    Index

    Methods

    • Create a SealedMessage from its components.

      Parameters

      • message: EncryptedMessage
      • encapsulatedKey: EncapsulationCiphertext

      Returns ComponentsSealedMessage

    • Seal a message for a recipient (no additional authenticated data).

      Parameters

      • plaintext: Uint8Array

        The message to encrypt

      • recipient: PublicKeyBase

        The recipient's public key

      Returns ComponentsSealedMessage

      A sealed message that only the recipient can decrypt

    • Seal a message for a recipient with additional authenticated data.

      Parameters

      • plaintext: Uint8Array

        The message to encrypt

      • recipient: PublicKeyBase

        The recipient's public key

      • aad: Uint8Array

        Additional authenticated data (not encrypted but authenticated)

      Returns ComponentsSealedMessage

      A sealed message that only the recipient can decrypt

    • Seal a message with optional test nonce (for deterministic testing).

      Parameters

      • plaintext: Uint8Array

        The message to encrypt

      • recipient: PublicKeyBase

        The recipient's public key

      • aad: Uint8Array

        Additional authenticated data

      • OptionaltestNonce: Nonce

        Optional fixed nonce for testing (DO NOT use in production)

      Returns ComponentsSealedMessage

      A sealed message

    • Returns the encrypted message.

      Returns EncryptedMessage

    • Returns the encapsulation ciphertext (ephemeral public key for X25519).

      Returns EncapsulationCiphertext

    • Returns the encapsulation scheme used.

      Returns EncapsulationScheme

    • Decrypt the sealed message using the recipient's private key.

      Parameters

      • privateKey: EncapsulationPrivateKey

        The recipient's private key

      Returns Uint8Array

      The decrypted plaintext

      Error if decryption fails

    • Get string representation.

      Returns string

    • Returns the CBOR tags associated with SealedMessage.

      Returns Tag[]

    • Returns the untagged CBOR encoding. Format: [EncryptedMessage (tagged), EncapsulationCiphertext (tagged)]

      Returns Cbor

    • Returns the tagged CBOR encoding.

      Returns Cbor

    • Returns the tagged value in CBOR binary representation.

      Returns Uint8Array

    • Creates a SealedMessage by decoding it from untagged CBOR.

      Parameters

      • cborValue: Cbor

      Returns ComponentsSealedMessage

    • Creates a SealedMessage by decoding it from tagged CBOR.

      Parameters

      • cborValue: Cbor

      Returns ComponentsSealedMessage

    • Returns the UR representation of the SealedMessage. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.

      Returns UR

    • Returns the UR string representation.

      Returns string