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

    Class PrivateKeyBase

    PrivateKeys - Container for a signing key and an encapsulation key.

    This type provides a convenient way to manage a pair of private keys for both signing and encryption operations.

    Implements

    Index

    Methods

    • Create a new PrivateKeys container with the given keys.

      Parameters

      Returns PrivateKeyBase

    • Create a new PrivateKeys container with random Ed25519/X25519 keys.

      Returns PrivateKeyBase

    • Generate a new PrivateKeys container with random Ed25519/X25519 keys. This is an alias for new() for API compatibility.

      Returns PrivateKeyBase

    • Returns the encapsulation private key.

      Note: Named to match Rust's API (which has a typo but we maintain compatibility)

      Returns EncapsulationPrivateKey

    • Derive the corresponding public keys.

      Returns PublicKeys

    • Sign a message using the signing private key.

      Parameters

      • message: Uint8Array

      Returns Signature

    • Decapsulate a shared secret from a ciphertext.

      This implements the Decrypter interface, allowing PrivateKeys to be used in encryption contexts where a shared secret needs to be recovered.

      Parameters

      • ciphertext: EncapsulationCiphertext

      Returns SymmetricKey

    • Returns a unique reference to this PrivateKeys instance.

      The reference is derived from the SHA-256 hash of the tagged CBOR representation, providing a unique, content-addressable identifier.

      Returns Reference

    • Compare with another PrivateKeys.

      Parameters

      Returns boolean

    • Get string representation.

      Format matches Rust: PrivateKeys(<short_reference>)

      Returns string

    • Returns the CBOR tags associated with PrivateKeys.

      Returns Tag[]

    • Returns the untagged CBOR encoding.

      Format: [, ]

      Returns Cbor

    • Returns the tagged CBOR encoding.

      Returns Cbor

    • Returns the tagged value in CBOR binary representation.

      Returns Uint8Array

    • Creates a PrivateKeys by decoding it from untagged CBOR.

      Parameters

      • cborValue: Cbor

      Returns PrivateKeyBase

    • Creates a PrivateKeys by decoding it from tagged CBOR.

      Parameters

      • cborValue: Cbor

      Returns PrivateKeyBase

    • Static method to decode from tagged CBOR.

      Parameters

      • cborValue: Cbor

      Returns PrivateKeyBase

    • Static method to decode from tagged CBOR binary data.

      Parameters

      • data: Uint8Array

      Returns PrivateKeyBase

    • Static method to decode from untagged CBOR binary data.

      Parameters

      • data: Uint8Array

      Returns PrivateKeyBase

    • Returns the UR representation.

      Returns UR

    • Returns the UR string representation.

      Returns string

    • Creates a PrivateKeys from a UR.

      Parameters

      • ur: UR

      Returns PrivateKeyBase

    • Creates a PrivateKeys from a UR string.

      Parameters

      • urString: string

      Returns PrivateKeyBase